Advanced
These chapters go deeper into how Jco binds components to JavaScript. They assume familiarity with the Transpiling chapter and the WASI support section.
- Optimized Host Bindings: the fast paths Jco generates for host calls, and when they apply.
- WIT Type representations: how each WIT type appears in JavaScript.
- Manual Wasm instantiation with WASI overrides: instantiating a transpiled component yourself and replacing individual WASI interfaces.
- Differences with Wasmtime: comparing host lifecycle and cleanup behavior across JavaScript and Rust embeddings.
- Stopping running instances: ending guest execution, releasing runtime-managed resources, and coordinating host cleanup.
- Detecting traps: catching component traps and receiving background
trap notifications with
onTrap. - Preview 3 streams and backpressure: how WASI 0.3 streams flow between host and guest.
- Preview 3 output flush and shutdown: draining stdout and stderr in Node.js and browser hosts.
- Preview 3 host value disposal: what happens to host-provided values a guest discards.
- Script-only components: building one engine component for many scripts, and packaging each script as a component of its own.