Stream: wasmtime

Topic: Compiling wasmtime to wasm32-unknown-unknown


view this post on Zulip Scott Andrews (Mar 10 2025 at 23:04):

Is there a happy-path set of features that will allow wasmtime to target wasm32-unknown-unknown? I'm looking for a way to use the component model inside environments that do not support components. One thought was to compile wasmtime itself to wasm and run embedded until proper support arrives. Unfortunately many of wasmtime's dependencies do not support wasm32.

view this post on Zulip bjorn3 (Mar 11 2025 at 10:55):

If you can run javascript you can use https://github.com/bytecodealliance/jco which turns a component into core wasm modules + glue js code. If you want to compile wasmtime for wasm32-unknown-unknown you will have to use the Pulley interpreter for wasm execution (which is much slower than the regular jitting wasmtime does) and compile wasmtime with the min-platform configuration.

JavaScript toolchain for working with WebAssembly Components - bytecodealliance/jco
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant - bytecodealliance/wasmtime

view this post on Zulip Scott Andrews (Mar 12 2025 at 12:40):

Thanks bjorn3. I think the path of least resistance will be to host the component over wrpc and use the go bindings natively.


Last updated: Apr 07 2025 at 11:03 UTC