wig: alex has convinced me that this BorrowChecker creation is correct
This commit is contained in:
@@ -468,12 +468,10 @@ pub fn define_struct_for_wiggle(args: TokenStream) -> TokenStream {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let mem: WasiMemory = mem.into();
|
let mem: WasiMemory = mem.into();
|
||||||
// FIXME:
|
// Wiggle does not expose any methods for functions to re-enter the
|
||||||
// Currently, none of the wasi-common functions will re-enter the guest, so
|
// WebAssembly module, or expose the memory via non-wiggle mechanisms.
|
||||||
// creating a BorrowChecker here ensures there is just one per the
|
// Therefore, creating a new BorrowChecker at the root of each function
|
||||||
// WebAssembly memory. I'd like a wasmtime expert to show me how to
|
// invocation is correct.
|
||||||
// create a BorrowChecker once per Store, and access it in this
|
|
||||||
// context, though.
|
|
||||||
let bc = wiggle::BorrowChecker::new();
|
let bc = wiggle::BorrowChecker::new();
|
||||||
wasi_common::wasi::#module_id::#name_ident(
|
wasi_common::wasi::#module_id::#name_ident(
|
||||||
&mut my_cx.borrow_mut(),
|
&mut my_cx.borrow_mut(),
|
||||||
|
|||||||
Reference in New Issue
Block a user