Michael-F-Bryan opened issue #2949:
We are currently using
wasmer
as a WebAssembly runtime and I'd like to simplify the way host functions are done by usingwiggle
.Is there a list of things I would need to do in order to implement a
wasmer-wiggle
crate? Or could you point me to a list of resources I can use as a starting point?
Michael-F-Bryan edited issue #2949:
We are currently using
wasmer
as a WebAssembly runtime and I'd like to simplify the way host functions are done by using WITX as an interface definition language and generating guest/host bindings withwiggle
.Is there a list of things I would need to do in order to implement a
wasmer-wiggle
crate? Or could you point me to a list of resources I can use as a starting point?
bjorn3 commented on issue #2949:
Based on the source of
wiggle-wasmtime
I think you need to first implementwiggle::GuestMemory
and then make a macro like https://github.com/bytecodealliance/wasmtime/blob/33c791e1f54c585a002ca244ac8ce2ef01a9cc34/crates/wiggle/wasmtime/macro/src/lib.rs to register the host functions to wasmer and create wrapper functions for calling into wasm.
pchickey commented on issue #2949:
I'm not familiar with how
wasmer
works so you'll mostly be on your own for this. You might be able to port wiggle today, but you may end up having to fork it in the long run depending on what your goals are.In addition to
wiggle-wasmtime
you can also use the sources oflucet-wiggle
as a reference: https://github.com/bytecodealliance/lucet/tree/main/lucet-wiggle Note that wiggle use in the lucet repo is currently based on a newer version of wiggle that is landing soon in https://github.com/bytecodealliance/wasmtime/pull/2897. Note that another change in 2897 is foldingwiggle-wasmtime
functionality straight into thewiggle
crate - doesn't make a big difference for now besides erasing some crates by using cargo features for optional functionality instead.Wasmtime has nearly subsumed Lucet in our (Fastly) production use. Once we have EOL'd Lucet, we intend to refactor wiggle to specialize it to just work with Wasmtime. Having wiggle factored to support two different runtimes makes it harder to read & write, among other design compromises we've been forced into. So, wiggle may end up evolving so that it is not viable to use on a different engine. Additionally, there is ongoing work to evolve the witx language and define the first ABI for Interface Types (https://github.com/WebAssembly/WASI/pull/422, https://github.com/WebAssembly/interface-types/pull/132), and we'll be evolving wiggle to support those developments as well.
alexcrichton commented on issue #2949:
I'm going to close this since wiggle is unsable enough that we're not going to be adding this to this repository. The wiggle infrastructure is not slated to suvive indefinitely as it's intended to be supplanted with wit-bindgen in the future as well.
alexcrichton closed issue #2949:
We are currently using
wasmer
as a WebAssembly runtime and I'd like to simplify the way host functions are done by using WITX as an interface definition language and generating guest/host bindings withwiggle
.Is there a list of things I would need to do in order to implement a
wasmer-wiggle
crate? Or could you point me to a list of resources I can use as a starting point?
Last updated: Dec 23 2024 at 12:05 UTC