Let WasmTy
differentiate between passing ownership into Wasm vs a borrow
#2056
Labels
wasmtime:api
Related to the API of the `wasmtime` crate itself
Only matters for reference types. But if we know the call is borrowing a reference type that will outlive the call, we don't need to add it into the activations table because the borrow checker already ensures it will live long enough.
Currently only
Func::{wrap,get}
will pass by value (and therefore need the activations table) whileFunc::call
will pass borrows (and therefore we know the reference will outlive the call, and it doesn't need to go into the table).See also bytecodealliance/wasmtime-dotnet#27 (comment)
The text was updated successfully, but these errors were encountered: