`wiggle` looks for an exported `Memory` named `"memory"` to use for its guest slices. This change allows it to use a `SharedMemory` if this is the kind of memory used for the export. It is `unsafe` to use shared memory in Wiggle because of broken Rust guarantees: previously, Wiggle could hand out slices to WebAssembly linear memory that could be concurrently modified by some other thread. With the introduction of Wiggle's new `UnsafeGuestSlice` (#5225, #5229, #5264), Wiggle should now correctly communicate its guarantees through its API.
wiggle
Wiggle is a code generator for the host side of a witx interface. It is
invoked as a Rust procedural macro.
Wiggle is not specialized to any particular WebAssembly runtime. It is usable in at least Wasmtime and Lucet.
Learning more
Read the docs on docs.rs.
There are child crates for integrating with Wasmtime and Lucet.
The wasi-common crate is implemented using Wiggle and the wasmtime-wasi crate integrates wasi-common with the Wasmtime engine.
Andrew Brown wrote a great blog post on using Wiggle with Wasmtime.