Eliminate runtime's direct dependeny on wasmparser.
This commit is contained in:
@@ -10,5 +10,4 @@ license = "Apache-2.0 WITH LLVM-exception"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
cranelift-codegen = "0.18.1"
|
cranelift-codegen = "0.18.1"
|
||||||
cranelift-wasm = "0.18.1"
|
cranelift-wasm = "0.18.1"
|
||||||
wasmparser = "0.17.2"
|
|
||||||
target-lexicon = "0.0.3"
|
target-lexicon = "0.0.3"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
extern crate cranelift_codegen;
|
extern crate cranelift_codegen;
|
||||||
extern crate cranelift_wasm;
|
extern crate cranelift_wasm;
|
||||||
extern crate target_lexicon;
|
extern crate target_lexicon;
|
||||||
extern crate wasmparser;
|
|
||||||
|
|
||||||
pub mod compilation;
|
pub mod compilation;
|
||||||
pub mod instance;
|
pub mod instance;
|
||||||
@@ -590,9 +589,8 @@ impl<'data, 'module> ModuleTranslation<'data, 'module> {
|
|||||||
self.module.signatures[self.module.functions[func_index]].clone();
|
self.module.signatures[self.module.functions[func_index]].clone();
|
||||||
|
|
||||||
let mut trans = FuncTranslator::new();
|
let mut trans = FuncTranslator::new();
|
||||||
let reader = wasmparser::BinaryReader::new(input);
|
|
||||||
trans
|
trans
|
||||||
.translate_from_reader(reader, &mut context.func, &mut self.func_env())
|
.translate(input, &mut context.func, &mut self.func_env())
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
let mut code_buf: Vec<u8> = Vec::new();
|
let mut code_buf: Vec<u8> = Vec::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user