mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Rename engine's Universal type to Backend
The Universal type was essentially a builder of engines that's given a compiler backend and creates an Engine with .engine() method. The name was not clear.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
//! Ready?
|
||||
|
||||
use wasmer::{imports, wat2wasm, FunctionEnv, Instance, Module, Store, TypedFunction};
|
||||
use wasmer_compiler::Universal;
|
||||
use wasmer_compiler::Backend;
|
||||
use wasmer_compiler_cranelift::Cranelift;
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -39,7 +39,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
// Note that we don't need to specify the engine/compiler if we want to use
|
||||
// the default provided by Wasmer.
|
||||
// You can use `Store::default()` for that.
|
||||
let mut store = Store::new_with_engine(&Universal::new(Cranelift::default()).engine());
|
||||
let mut store = Store::new_with_engine(&Backend::new(Cranelift::default()).engine());
|
||||
let mut env = FunctionEnv::new(&mut store, ());
|
||||
|
||||
println!("Compiling module...");
|
||||
|
||||
Reference in New Issue
Block a user