* wiggle: Inline some trivial functions This commit marks a number of functions in wiggle as `#[inline]` as they're otherwise trivial, mostly returning constants. This comes out of some work I looked at recently with Andrew where some of these functions showed up in profiles when they shouldn't. * wiggle: Optimize the `GuestMemory` for shared memory This commit implements a minor optimization to the `GuestMemory` implementation for Wasmtime to skip most methods if a shared memory is in play. Shared memories never get borrowed and this can be used to internally skip some borrow-checker methods. * wiggle: Optimize `GuestPtr::to_vec` This commit replaces the safe implementation of `GuestPtr::to_vec` with an unsafe implementation. The purpose of this is to speed up the function when used with shared memory which otherwise performs a bunch of atomic reads for types like `u8` which does validation-per-element and isn't vectorizable. On a benchmark I was helping Andrew with this sped up the host code enough to the point that guest code dwarfed the execution time. * Fix build
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.