Skip to content

About

Leptos WASI Preview 2/3 integration, working with wasmtime, spin and possibly other runtimes

Resources

Stars

3 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

leptos_wasi

Run a Leptos server as a wasi:http WebAssembly component on Wasmtime or Spin.

leptos_wasi connects Leptos server functions, routing, streaming SSR, islands, and static assets to WASI HTTP. It has additive adapters for WASI Preview 2 and Preview 3, so one dependency graph can compile either or both component entrypoints.

wasip3_demo.mp4

Requirements

  • Rust 1.94.0 or newer. CI and rust-toolchain.toml pin 1.99.0
  • wasm32-wasip2 (rustup target add wasm32-wasip2)
  • Cargo Leptos 0.3.11 for the included islands example. The browser CI job installs the same version. 0.3.6 leaves __wbindgen_placeholder__ imports in the split module, so the browser never instantiates it.
  • wasm-bindgen-cli 0.2.129, matching the counter's locked browser crate
  • Wasmtime 50.0.0 and official Spin 4.2.5 serve this revision's Preview 3 test-app, including server-function POST and SSR. CI installs Wasmtime 50.0.0 and Spin 4.0.2. Spin 4.0.2 rejects final wasi:[email protected]. The maintained Spin 4.1.0-pre0 fork at c34c584... remains the lock's experimental lane

The Rust target name is wasm32-wasip2 for both component models. The wasip2 and wasip3 crate features select the host bindings and executor, not the Rust compilation target.

Features

Feature Default Purpose
wasip2 Yes Preview 2 incoming handler and cooperative pollable executor
wasip3 No Preview 3 async HTTP adapter and host task spawner
workers No Cloudflare Workers adapter (requires --target wasm32-unknown-unknown)
aws No AWS Lambda adapter (native binary on tokio, no wasm target)
serve No Native HTTP server adapter for container platforms (Cloud Run, Azure Container Apps, bare metal)
edge wasm32 WinterCG isolate adapter (Netlify Edge, Vercel Edge) - one wasm module, streaming in both directions
islands-router No Request-aware Leptos islands-router SSR
tracing No Structured request spans without installing a subscriber

Preview 2:

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5" }

Preview 3:

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5", default-features = false, features = ["wasip3"] }

Both adapters in one build:

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5", features = ["wasip3", "islands-router"] }

The features are additive. Enabling wasip3 does not disable or replace the wasip2 API.

Releases use the crates.io package name leptos-wasi-runtime because publication access to the upstream leptos_wasi package is not available. The dependency alias and library target remain leptos_wasi, so Rust import paths are unchanged.

Runtime-specific API

Import the handler from the runtime namespace. The root prelude contains only shared response, configuration, and redirect types.

// Preview 2
use leptos_wasi::wasip2::prelude::{
    Handler, IncomingRequest, Mode, ResponseOutparam, WasiExecutor,
};

// Preview 3
use leptos_wasi::wasip3::prelude::{Handler, init_wasip3_spawner};

// Cloudflare Workers
use leptos_wasi::workers::prelude::{Handler, init_workers_spawner};

Every typed server function uses the single canonical registration API:

handler
    .with_server_fn::<CreateTodo>()
    .with_server_fn::<DeleteTodo>();

The 0.3 aliases with_server_fn_axum and with_server_fn_generic were removed. Axum-compatible body types remain an internal compatibility detail of the code generated by Leptos; leptos_wasi does not run an Axum server.

Middleware and composition

Whole-service HTTP middleware is a separate deployment concern. A WASIp3 middleware component can wrap this terminal service through standard component composition; it does not require another Handler builder method.

Runtime Composed chain
Wasmtime 50.0.0 Serves a WAC plug of cors, security-headers, and request-id around this test-app when the CORS environment is set. POST /api/post_test and GET /ssr/async returned 200 on 2026-10-24
Wasmtime 50.0.0 CI install, matching components.lock.toml
Tagged Spin 4.0.2 Cannot link final wasi:[email protected]
Official Spin 4.2.5 Same public stack, WAC-composed and native dependencies.middleware, served those body routes. authn-policy was not in the chain
Pinned Spin main Terminal and outbound HTTP work on the lock's fork; the default CPU-metrics hook panic was not re-run

The Spin paths are compatibility canaries, not deployment claims. See WASIp3 HTTP Middleware for the boundary between component middleware, server-function middleware, and ingress policy, and Spin final-WASI compatibility for the exact gates.

Companion components

Typed authentication, Cedar/SpiceDB authorization, and trusted ingress live in the separately versioned wasi-auth repository, not in this crate. Its private leptos-wasi-authz bridge is an application dependency, not a leptos_wasi handler API. HTTP middleware lives in wasi-http-middleware.

Source pins, recorded in tests/middleware/components.lock.toml:

  • wasi-auth bdfad80372287a3be4215aeefad534098ef6537b (PR 17). The crate version in that tree is 0.1.0-rc.5. The unpublished release target is 0.1.0-rc.6. Published 0.1.0-rc.5 on main still resolves wasip3 0.7.0, so Cargo requirements stay =0.1.0-rc.5 and the git revision is the pin.
  • wasi-http-middleware 3df96c21a7906b885e67229e9a7c8c01b6497109 (PR 1). The crate version in that tree is 0.2.0-alpha.3. Header policy is non-overwriting. The unpublished release target is v0.2.0-alpha.4.

tests/middleware/artifact-sets.toml still records the published wasi-auth-v0.1.0-rc.3 and wasi-http-middleware-v0.2.0-alpha.3 bundles. Those digests were not recomputed for the git pins above. CI checks the source revisions and does not verify those signature digests until rc.6 and v0.2.0-alpha.4 are published.

Scope

Version 0.4.2 does not claim a generic-response or fully Axum-free server-function backend. Upstream server_fn's generic Request<Bytes> fixes its WebSocket response to Response<Bytes>, which does not form the request/response pairing needed by the generic response body. A native WasiServerFnBackend therefore needs a dedicated request newtype and macro support and remains a post-0.5 experiment.

The counter persistence service owns a local SQLite database behind a private HTTP boundary. Both make wasmtime and make spin use it, proving that the same WASIp3 component keeps state across refreshes and runtime restarts without a runtime-specific database API.

See Tested Compatibility for the complete version tuple, installation commands, and the wasm-bindgen WASI regression history.

Preview 3 entrypoint

use leptos::config::get_configuration;
use leptos_wasi::wasip3::prelude::{
    Handler, HandlerError, RegistrationError, RouteTable, init_wasip3_spawner,
};
use wasip3::http::types::{ErrorCode, Request, Response};

thread_local! {
    static ROUTES: Result<RouteTable, RegistrationError> =
        RouteTable::discover(App, None, || {});
}

struct LeptosServer;

impl wasip3::exports::http::handler::Guest for LeptosServer {
    async fn handle(request: Request) -> Result<Response, ErrorCode> {
        init_wasip3_spawner()
            .map_err(|_| ErrorCode::InternalError(None))?;
        let leptos_options = get_configuration(None)
            .map_err(|_| ErrorCode::InternalError(None))?
            .leptos_options;

        let request = wasip3::http_compat::http_from_wasi_request(request)?;
        let routes = ROUTES.with(Clone::clone)
            .map_err(|_| ErrorCode::InternalError(None))?;
        let response = Handler::build(request)
            .await
            .map_err(HandlerError::into_error_code)?
            .static_files_handler("/pkg", serve_static_files)
            .map_err(|_| ErrorCode::InternalError(None))?
            .with_server_fn::<IncrementCount>()
            .generate_routes_from(&routes)
            .map_err(|_| ErrorCode::InternalError(None))?
            .handle_with_context(
                move || shell(leptos_options.clone()),
                || {},
            )
            .await
            .map_err(HandlerError::into_error_code)?;

        Ok(response)
    }
}

wasip3::http::service::export!(LeptosServer);

Initialize the Preview 3 spawner once and propagate initialization conflicts. Repeated successful initialization is idempotent.

Preview 2 entrypoint

use leptos::config::get_configuration;
use leptos_wasi::wasip2::prelude::{
    Handler, IncomingRequest, Mode, RegistrationError, ResponseOutparam,
    RouteTable, init_wasip2_executor,
};
use wasi::{
    exports::wasi::http::incoming_handler::Guest,
    http::types::ErrorCode,
};

thread_local! {
    static ROUTES: Result<RouteTable, RegistrationError> =
        RouteTable::discover(App, None, || {});
}

struct LeptosServer;

impl Guest for LeptosServer {
    fn handle(request: IncomingRequest, response_out: ResponseOutparam) {
        let executor = match init_wasip2_executor(Mode::Stalled) {
            Ok(executor) => executor,
            Err(error) => {
                eprintln!("failed to initialize the Preview 2 executor: {error}");
                ResponseOutparam::set(
                    response_out,
                    Err(ErrorCode::InternalError(None)),
                );
                return;
            }
        };
        let leptos_options = match get_configuration(None) {
            Ok(config) => config.leptos_options,
            Err(error) => {
                eprintln!("failed to load Leptos configuration: {error}");
                ResponseOutparam::set(
                    response_out,
                    Err(ErrorCode::InternalError(None)),
                );
                return;
            }
        };

        let result = executor.run_until(async move {
            let result: Result<(), Box<dyn std::error::Error>> = async {
                let routes = ROUTES.with(Clone::clone)?;
                Handler::build(request, response_out)?
                    .with_server_fn::<IncrementCount>()
                    .generate_routes_from(&routes)?
                    .handle_with_context(
                        move || shell(leptos_options.clone()),
                        || {},
                    )
                    .await?;
                Ok(())
            }
            .await;
            result
        });

        match result {
            Ok(Ok(())) => {}
            Ok(Err(error)) => eprintln!("request failed: {error}"),
            Err(error) => eprintln!("Preview 2 executor failed: {error}"),
        }
    }
}

wasi::http::proxy::export!(LeptosServer with_types_in wasi);

init_wasip2_executor installs and caches one thread-local executor. Calls with the same mode reuse it; a conflicting mode or another installed task spawner returns a persistent error. Map initialization and stalled-executor failures to the component's host error policy.

Cloudflare Workers entrypoint

The workers feature adapts the same handler core to Cloudflare Workers via workers-rs. The app is compiled to wasm32-unknown-unknown (not a WASI target) and bundled with worker-build; workerd does not implement the component model, so this target is a separate artifact from the Spin/SpinKube component, built from the same application code.

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5", default-features = false, features = ["workers"] }
use leptos_wasi::workers::prelude::{Handler, init_workers_spawner};

#[worker::event(fetch)]
async fn fetch(
    req: worker::HttpRequest,
    env: worker::Env,
    _ctx: worker::Context,
) -> worker::Result<http::Response<leptos_wasi::response::Body>> {
    console_error_panic_hook::set_once();
    init_workers_spawner().map_err(worker_error)?;

    let conf = get_configuration(None).map_err(worker_error)?;
    let leptos_options = conf.leptos_options;

    let handler = Handler::build(req).await.map_err(worker_error)?;
    let handler = handler
        .with_server_fn::<GetCount>()
        .generate_routes(App)
        .map_err(worker_error)?;

    // `Env` is `Send + Sync` (the isolate is single-threaded), so server
    // functions can recover it with `use_context` for KV/D1/R2 access.
    Ok(handler
        .handle_with_context(move || shell(leptos_options.clone()), move || {
            provide_context(env.clone());
        })
        .await)
}

The same request policy, streaming SSR, and server-function registration apply. Serve static files through Workers Static Assets ([assets] in wrangler.toml pointing at target/site) instead of a fileserver component: assets are then answered by the platform without invoking the worker. A complete working example lives in examples/cf-counter, including the wrangler.toml build wiring.

AWS Lambda entrypoint

The aws feature adapts the handler core to AWS Lambda through lambda_http. Unlike every other target this is a native binary: plain tokio, no wasm, no single-threaded executor constraint. Event sources - function URLs, API Gateway, ALBs - buffer request bodies before invocation, so there is no streaming ingest deadline; responses are likewise collected whole because the platform serializes one response object per invocation.

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5", default-features = false, features = ["aws"] }
use leptos_wasi::aws::prelude::{Handler, init_aws_spawner};

#[tokio::main]
async fn main() -> Result<(), lambda_http::Error> {
    lambda_http::run(lambda_http::service_fn(handle)).await
}

async fn handle(
    request: lambda_http::Request,
) -> Result<http::Response<lambda_http::Body>, lambda_http::Error> {
    init_aws_spawner()?;
    let conf = get_configuration(None)?;
    let leptos_options = conf.leptos_options;

    let handler = Handler::build(request).await?;
    let handler = handler
        .with_server_fn::<GetCount>()
        .generate_routes(App)?;

    handler
        .handle_with_context(move || shell(leptos_options.clone()), || {})
        .await
        .map_err(Into::into)
}

Server functions run inside the same invocation and reach DynamoDB, S3, or any other AWS service through the regular SDKs - see examples/aws-counter for the complete shape, including why static assets embed in the binary and why the static handler is scoped to /pkg.

Native server entrypoint (Cloud Run, containers, bare metal)

The serve feature covers every platform that hands the application a port and expects HTTP on it. Bodies stream in both directions - progressive SSR flushing reaches the client - and serve::run bundles the harness: spawner install, listener, per-connection hyper serving, and SIGTERM-aware shutdown.

[dependencies]
leptos_wasi = { package = "leptos-wasi-runtime", version = "0.5.5", default-features = false, features = ["serve"] }
use leptos_wasi::serve::prelude::{Handler, run};

#[tokio::main]
async fn main() {
    let conf = get_configuration(None).expect("leptos configuration");
    let leptos_options = conf.leptos_options;
    let port: u16 = std::env::var("PORT")
        .ok()
        .and_then(|port| port.parse().ok())
        .unwrap_or(8080);
    // The closure's error type is boxed so ingest, registration, and
    // render errors all convert into one shape.
    type Error = Box<dyn std::error::Error + Send + Sync>;
    run(([0, 0, 0, 0], port).into(), move |request| {
        let leptos_options = leptos_options.clone();
        async move {
            let handler = Handler::build(request).await?;
            let handler = handler
                .with_server_fn::<GetCount>()
                .generate_routes(App)?;
            let response = handler
                .handle_with_context(move || shell(leptos_options.clone()), || {})
                .await?;
            Ok::<_, Error>(response)
        }
    })
    .await
    .expect("server must serve");
}

serve::run takes any Fn(Request) -> Future closure once per request; applications needing their own listener logic use serve::Handler directly and drive hyper themselves. examples/gcp-counter is the complete shape, including the Dockerfile that is the whole Cloud Run artifact.

Request policy

The default maximum buffered incoming body is 16 MiB. Configure a smaller application-specific limit when building either handler:

use leptos_wasi::prelude::HandlerConfig;

let config = HandlerConfig::default()
    .with_max_request_body_size(2 * 1024 * 1024);

Pass config to the runtime handler's build_with_config method. Declared and collected bodies over the limit receive 413 Payload Too Large; invalid or conflicting Content-Length values receive 400 Bad Request.

The size limit bounds how large a body may be, never how long it may take to arrive. A client that trickles bytes, or stalls without closing, holds the guest instance until the host ends the request. Request deadlines belong at the ingress for that reason — a guest cannot cancel a client the host keeps feeding — but when an ingress cannot supply one, an optional whole-body budget is available:

let config = HandlerConfig::default()
    .with_request_body_timeout_ns(5_000_000_000); // 5 seconds

It is None by default, so no existing deployment changes behaviour. Exceeding it produces 408 Request Timeout. The budget covers the whole body rather than the gap between chunks, so a client feeding one byte at a time cannot refresh it.

Incoming bodies are currently buffered. SsrMode::Async buffers the whole page before the first byte; prefer InOrder or OutOfOrder when TTFB matters. Request-body streaming, WebSockets, HTTP trailers, static SSR generation, byte ranges, and automatic precompressed asset negotiation are not supported. Configure request deadlines, concurrency, memory limits, and filesystem capabilities in Wasmtime or Spin. See Production Support for the complete contract and Performance Baseline for the recorded 0.3.2 comparison.

Reusing the route table

generate_routes still discovers on every SSR request. When the host reuses a component instance (wasmtime serve --max-instance-reuse-count, Spin), discover once per instance and install the table with generate_routes_from. thread_local! is the usual choice in a WASI component; std::sync::OnceLock is equivalent if you prefer a static.

thread_local! {
    static ROUTES: Result<RouteTable, RegistrationError> =
        RouteTable::discover(App, None, || {});
}
// per request:
let routes = ROUTES.with(Clone::clone)?;
handler.generate_routes_from(&routes)?;

Discovery context must stay request-independent. Per-request context belongs in handle_with_context.

Validating the route table

Route discovery renders the whole application, so the handler skips it on requests that cannot use the SSR router: a server function, a static asset, or an already-selected response resolves without it. An application reached only through those paths therefore never validates its route table while serving.

validate_route_table closes that gap from a test. It applies exactly the rules the request path applies — duplicate patterns, including ones differing only by parameter name, and unsupported SsrMode::Static routes — and shares its implementation with the request path, so the two cannot drift apart.

#[test]
fn route_table_is_valid() {
    leptos_wasi::validate_route_table(App, None, || {})
        .expect("route table should be valid");
}

Performance

The largest throughput lever for a WASIp2 deployment is not in this crate. wasmtime serve --max-instance-reuse-count defaults to 1 for WASIp2 and 128 for WASIp3, so a Preview 2 deployment rebuilds the component for every request unless it opts out — measured at about 14% of throughput.

Reuse also makes guest statics outlive a request, so test your application under it before enabling it. Pair it with a RouteTable (see Reusing the route table) so discovery is not paid again on every SSR request. See Production Support for the measurements and the obligation, and Performance Baseline for the method. Comparison with native axum records throughput against leptos_axum, Wasmtime against Spin, and where the difference comes from.

A redirect carried by a server-function response has its Location reduced to a same-origin path before it is sent. A Location written through ResponseOptions, including by leptos_wasi::prelude::redirect, is sent as written. See Production Support for the exact rule and how it differs from leptos_axum and leptos_actix.

Content Security Policy

leptos_wasi provides a fresh Leptos nonce for every request, alongside the other standard contexts, and stamps it onto the inline streaming <script> elements it emits. Split-WASM preload links emitted by this crate use that same nonce on the nonce attribute and crossorigin="anonymous". It does not emit a Content-Security-Policy header. An application can emit one with no additional leptos_wasi API by writing the header through ResponseOptions while the first chunk of the document is rendered:

use http::{HeaderValue, header::CONTENT_SECURITY_POLICY};
use leptos::prelude::use_context;
use leptos_wasi::prelude::ResponseOptions;

#[cfg(feature = "ssr")]
fn provide_csp() {
    let (Some(res), Some(nonce)) =
        (use_context::<ResponseOptions>(), leptos::nonce::use_nonce())
    else {
        return;
    };
    let policy = format!(
        "default-src 'self'; \
         script-src 'self' 'nonce-{nonce}' 'wasm-unsafe-eval'; \
         style-src 'self'; \
         connect-src 'self'; \
         object-src 'none'; \
         base-uri 'self'; \
         frame-ancestors 'none'"
    );
    // When `/pkg` is served from a CDN, add that origin to `script-src` and
    // `connect-src` as well, or the split WASM fetch and hydration scripts
    // are blocked.
    if let Ok(value) = HeaderValue::from_str(&policy) {
        res.insert_header(CONTENT_SECURITY_POLICY, value);
    }
}

#[component]
pub fn App() -> impl IntoView {
    provide_meta_context();
    #[cfg(feature = "ssr")]
    provide_csp();
    // ...
}

ResponseOptions is merged into the response after the first body chunk has been awaited, so a header written synchronously from the application component reaches the client. A header written later, from inside a Suspense boundary that resolves after the first chunk, does not.

Two constraints shape any workable policy:

  • Leptos hydration compiles and instantiates WebAssembly from JavaScript. A script-src that omits 'wasm-unsafe-eval' stops hydration in browsers that enforce the WebAssembly CSP integration.
  • leptos_meta's Stylesheet and Link components accept no nonce attribute; only Script and Style do, and only when the leptos_meta/nonce feature is enabled. A style-src restricted to 'nonce-…' therefore blocks the external stylesheet that examples/counter and tests/test-app load through <Stylesheet href=… />. Either keep 'self' in style-src, as above, or write the <link rel="stylesheet"> directly in the shell's <head> with nonce=leptos::nonce::use_nonce().

The helper is gated on ssr because leptos_wasi is a server-only dependency. leptos_wasi enables leptos/nonce, so leptos::nonce is available in the server build without further feature configuration; enable leptos_meta/nonce as well if you want leptos_meta's Script and Style to carry the nonce automatically.

Leptos 0.8.22 HydrationScripts still writes the nonce into the crossorigin attribute of its modulepreload and wasm preload links (hydration/mod.rs). That is upstream of this crate. A nonce CSP will not match those two links until Leptos emits nonce and a separate crossorigin. The lazy split preloads this crate inserts are not that path.

The reference production topology in WASIp3 HTTP Middleware places response security headers at the ingress. Emitting the policy from the guest is what lets it carry the per-request nonce; an ingress that does not see that nonce can only send a nonce-free policy.

Static assets

fn serve_static_files(path: String) -> Option<leptos_wasi::response::Body> {
    // `path` is normalized and relative to the registered URI prefix.
    std::fs::read(format!("/site/pkg/{path}"))
        .ok()
        .map(|bytes| leptos_wasi::response::Body::Sync(bytes.into()))
}

let handler = handler.static_files_handler("/pkg", serve_static_files)?;

The handler accepts GET and HEAD, rejects encoded separators and traversal, and passes only a normalized relative path to the callback. The callback must still prevent symlinks inside its asset root from resolving outside that root. Guest-served responses set Content-Type, X-Content-Type-Options: nosniff, and Content-Length; they set no Cache-Control, ETag, or Last-Modified, and conditional requests are not answered with 304. For high-volume production assets, or anywhere caching and revalidation headers matter, prefer a host fileserver or CDN.

Islands and split browser WASM

Leptos islands and browser WASM splitting work with the Preview 3 server component on Wasmtime 50.0.0; the browser CI job runs that lane. It was not re-run on Spin 4.2.5. Splitting affects the browser target (wasm32-unknown-unknown), not the WASI server component. Spin 4.2.5 does link the server component; the browser promotion on that host is still open.

#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
    leptos::mount::hydrate_islands();
}

#[island(lazy)]
fn CounterIsland() -> impl IntoView {
    // Only this interactive island is included in its lazy browser chunk.
}

Render <HydrationScripts options islands=true />, build the frontend with splitting, and deploy the complete target/site/pkg directory:

cargo leptos build --release --split --frontend-only
LEPTOS_OUTPUT_NAME=my_app cargo build --lib --target wasm32-wasip2 \
  --release --no-default-features --features ssr

Keep Cargo Leptos hash-files disabled for this WASI flow. Current Leptos hash manifest discovery relies on current_exe(), which Rust's WASI standard library does not support. Deploy the unhashed package atomically and avoid long-lived asset caching.

Enable islands-router in both the browser application and leptos_wasi only when using Leptos client-side islands navigation. Ordinary multi-page islands do not require it.

Example

examples/counter is the supported example. It demonstrates SSR, one lazy island, split browser WASM, typed server-function registration, SQLite-backed idempotent increments, Wasmtime, and a pinned Spin compatibility manifest. Without COUNTER_STORE_URL, the component deliberately falls back to an isolated session counter for protocol and authorization tests.

Upgrade and operations

  • Read Migration guide before upgrading.
  • Read Production Support before exposing a component to public traffic.
  • Review Performance Baseline and retain the CI soak artifacts before a release.
  • Run cargo make ci for the complete Preview 2, Preview 3, and dual-feature local verification matrix.
  • After installing Chromium through Playwright, run HOST=wasmtime ./tests/browser/run.sh to verify lazy split-WASM hydration against the blocking final-WASI host.
  • To exercise the experimental pinned WASIp3 middleware fixture, install the tool versions recorded in tests/middleware/components.lock.toml, then run ./scripts/run-middleware-tests.sh. Set MIDDLEWARE=1 HOST=wasmtime on the browser command to prove middleware wrapping, authentication-context propagation, and lazy hydration without making /pkg split assets private.
  • Run ./scripts/run-authz-browser.sh from sibling checkouts to prove the real authentication plus Cedar/SpiceDB authorization chain. Wasmtime is the final-WASI correctness reference and does not currently satisfy the c100 production latency target. Spin is the preferred production-performance runtime once a tagged release links final wasi:[email protected].
  • Use ./scripts/tune-trusted-ingress.sh to select Wasmtime instance lifecycle values before running the paired trusted-ingress benchmark. Production relationship checks call SpiceDB directly; the AuthZEN SpiceDB service is a compatibility profile, not the default performance path.
  • Run ./scripts/run-authz-lifecycle-e2e.sh and ./scripts/run-authz-wasip2-lifecycle-e2e.sh to exercise final-artifact WASIp3 and cancellation-safe WASIp2 authorization transport recovery.
  • Trusted-ingress benchmarks and soaks use the Rust trusted-load fixture with persistent HTTP/1.1 connections. scripts/load_runtime.py remains only for older transport tests and must not be used as promotion evidence.

About

Leptos WASI Preview 2/3 integration, working with wasmtime, spin and possibly other runtimes

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages