pub fn shared_handler() -> Result<NanoServiceHandler, NanoServiceError>Expand description
A process-wide shared nano-service handler. wasmtime recommends a
single Engine per process (compiled modules are cached and shared
across threads), so the dataplane reuses one handler for every
nano-service route. The handler is stateless beyond the immutable
engine + linker (both Arc-held), so sharing it across requests and
tests is safe. Lazily initialized on first use; a construction
failure (wasmtime misconfiguration) is reported once and cached as
an error so every subsequent request answers 502 without retrying.