Add shortcut translation API

This commit is contained in:
Rerumu
2022-05-21 21:57:21 -04:00
parent f02070a1b3
commit ca57cf915a
10 changed files with 46 additions and 34 deletions
+1 -3
View File
@@ -1,6 +1,5 @@
#![no_main]
use wasm_ast::builder::TypeInfo;
use wasm_smith::Module;
// We are not interested in parity_wasm errors.
@@ -11,8 +10,7 @@ libfuzzer_sys::fuzz_target!(|module: Module| {
Err(_) => return,
};
let type_info = TypeInfo::from_module(&wasm);
let sink = &mut std::io::sink();
codegen_luajit::from_module(&wasm, &type_info, sink).expect("LuaJIT should succeed");
codegen_luajit::from_module_untyped(&wasm, sink).expect("LuaJIT should succeed");
});
+1 -3
View File
@@ -1,6 +1,5 @@
#![no_main]
use wasm_ast::builder::TypeInfo;
use wasm_smith::Module;
// We are not interested in parity_wasm errors.
@@ -11,8 +10,7 @@ libfuzzer_sys::fuzz_target!(|module: Module| {
Err(_) => return,
};
let type_info = TypeInfo::from_module(&wasm);
let sink = &mut std::io::sink();
codegen_luau::from_module(&wasm, &type_info, sink).expect("Luau should succeed");
codegen_luau::from_module_untyped(&wasm, sink).expect("Luau should succeed");
});