wiggle: make wasmtime a mandatory dep, get rid of own Trap enum (#5137)
* wiggle: no longer need to guard wasmtime integration behind a feature this existed so we could use wiggle in lucet, but lucet is long EOL * replace wiggle::Trap with wiggle::wasmtime_crate::Trap * wiggle tests: unwrap traps because we cant assert_eq on them * wasi-common: emit a wasmtime::Trap instead of a wiggle::Trap formally add a dependency on wasmtime here to make it obvious, though we do now have a transitive one via wiggle no matter what (and therefore can get rid of the default-features=false on the wiggle dep) * wasi-nn: use wasmtime::Trap instead of wiggle::Trap there's no way the implementation of this func is actually a good idea, it will panic the host process on any error, but I'll ask @mtr to fix that * wiggle test-helpers examples: fixes * wasi-common cant cross compile to wasm32-unknown-emscripten anymore this was originally for the WASI polyfill for web targets. Those days are way behind us now. * wasmtime wont compile for armv7-unknown-linux-gnueabihf either
This commit is contained in:
@@ -44,9 +44,10 @@ impl IntFloatExercise {
|
||||
&host_memory,
|
||||
self.an_int as i32,
|
||||
self.an_float,
|
||||
));
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(e, Ok(types::Errno::Ok as i32), "int_float_args error");
|
||||
assert_eq!(e, types::Errno::Ok as i32, "int_float_args error");
|
||||
}
|
||||
|
||||
pub fn strat() -> BoxedStrategy<Self> {
|
||||
@@ -78,13 +79,14 @@ impl DoubleIntExercise {
|
||||
&host_memory,
|
||||
self.input as i32,
|
||||
self.return_loc.ptr as i32,
|
||||
));
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
let return_val = host_memory
|
||||
.ptr::<types::AliasToFloat>(self.return_loc.ptr)
|
||||
.read()
|
||||
.expect("failed to read return");
|
||||
assert_eq!(e, Ok(types::Errno::Ok as i32), "errno");
|
||||
assert_eq!(e, types::Errno::Ok as i32, "errno");
|
||||
assert_eq!(return_val, (self.input as f32) * 2.0, "return val");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user