This is currently a very common operation in host bindings where if wasm gives a host function a relative pointer you'll want to simulataneously work with the host state and the wasm memory. These two regions are distinct and safe to borrow mutably simulataneously but it's not obvious in the Rust type system that this is so, so add a helper method here to assist in doing so.
wiggle-generate
This is a library crate that implements all of the component parts of
the wiggle proc-macro crate.
Code lives in a separate non-proc-macro crate so that it can be reused in
other settings, e.g. the lucet-wiggle crate.
Code generated by this crate should not have any references to a particular WebAssembly runtime or engine. It should instead expose traits that may be implemented by an engine. Today, it is consumed by both Lucet and Wasmtime.