fix tests }:3
build / build (push) Successful in 4m52s

This commit is contained in:
2026-07-18 02:49:34 -06:00
parent 9334373f96
commit a97a0ad7bb
14 changed files with 217 additions and 91 deletions
+7 -1
View File
@@ -31,13 +31,19 @@ fn get_config () -> Config {
cfg
}
fn link_primitives (linker : &mut Linker<u32>) -> wasmtime::Result<()> {
linker.func_wrap ("gyehoek", "write", gyehoek::write)?;
linker.func_wrap ("gyehoek", "to-bool", gyehoek::truthy_p)?;
Ok (())
}
pub fn main () -> wasmtime::Result<()> {
let args = Args::parse ();
let wasm_config = get_config ();
let engine = Engine::new (&wasm_config)?;
let module = Module::new (&engine, read (args.wasm)?)?;
let mut linker = Linker::new (&engine);
linker.func_wrap ("gyehoek", "write", gyehoek::write)?;
link_primitives (&mut linker)?;
let mut store : Store<u32> = Store::new (&engine, 4);
let instance = linker.instantiate (&mut store, &module)?;
let main = instance.get_typed_func::<(),()> (&mut store, "main")?;