wizer
wizer copied to clipboard
Support running initialization with a custom `wasmtime::Linker`
Right now, you can either turn WASI on or off.
But there is no reason a user of the builder API shouldn't be able to provide their own wasmtime::Linker
that defines non-WASI things that the Wasm module can import and use during initialization, or provide just some of WASI, or a virtualized/fake WASI, etc.
This would involve adding a new method to the builder API (https://github.com/bytecodealliance/wizer/blob/7c33b0bc2bd40ceb98727482be8fd8f115c6ced6/src/lib.rs#L77, https://github.com/bytecodealliance/wizer/blob/7c33b0bc2bd40ceb98727482be8fd8f115c6ced6/src/lib.rs#L241) to configure the provided wasmtime::Linker
and then using that linker instead of creating a new one over here: https://github.com/bytecodealliance/wizer/blob/7c33b0bc2bd40ceb98727482be8fd8f115c6ced6/src/lib.rs#L635