| Date: Wed, 9 Mar 2022 00:15:43 +0100
runtime: Switch to singlepass compiler.
Diffstat:
M Cargo.toml | 1 +
M src/runtime.rs | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
--- |
| t@@ -1,6 +1,7 @@
use anyhow::{anyhow, Result};
use drk_sdk::entrypoint;
-use wasmer::{imports, Cranelift, Instance, Memory, Module, Store, Universal, Value};
+use wasmer::{imports, Instance, Memory, Module, Store, Universal, Value};
+use wasmer_compiler_singlepass::Singlepass;
use crate::memory::MemoryManipulation;
t@@ -19,7 +20,7 @@ impl Runtime {
/// Create a new wasm runtime instance that contains the given wasm module.
pub fn new(wasm_bytes: &[u8]) -> Result {
// Define the compiler, engine, and store
- let compiler = Cranelift::default();
+ let compiler = Singlepass::new();
let store = Store::new(&Universal::new(compiler).engine());
println!("Compiling module..."); |