bytecodealliance / bytecodealliance/wizer
Support running initialization with a custom `wasmtime::Linker`
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.