wig: create a BorrowChecker just to get things compiling. Needs fixing.
This commit is contained in:
@@ -468,9 +468,17 @@ pub fn define_struct_for_wiggle(args: TokenStream) -> TokenStream {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
let mem: WasiMemory = mem.into();
|
let mem: WasiMemory = mem.into();
|
||||||
|
// FIXME:
|
||||||
|
// Currently, none of the wasi-common functions will re-enter the guest, so
|
||||||
|
// creating a BorrowChecker here ensures there is just one per the
|
||||||
|
// WebAssembly memory. I'd like a wasmtime expert to show me how to
|
||||||
|
// create a BorrowChecker once per Store, and access it in this
|
||||||
|
// context, though.
|
||||||
|
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(),
|
||||||
&mem,
|
&mem,
|
||||||
|
&bc,
|
||||||
#(#hostcall_args),*
|
#(#hostcall_args),*
|
||||||
) #cvt_ret
|
) #cvt_ret
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user