mirror of
https://github.com/mii443/wasmer.git
synced 2025-08-22 16:35:33 +00:00
feat: Rename wasmer-engine-native
to wasmer-engine-dylib
.
This commit is contained in:
@ -17,7 +17,7 @@ wasmer-compiler-cranelift = { path = "../lib/compiler-cranelift", optional = tru
|
||||
wasmer-compiler-llvm = { path = "../lib/compiler-llvm", optional = true }
|
||||
wasmer-compiler-singlepass = { path = "../lib/compiler-singlepass", optional = true }
|
||||
wasmer-engine-universal = { path = "../lib/engine-universal", optional = true }
|
||||
wasmer-engine-shared-object = { path = "../lib/engine-shared-object", optional = true }
|
||||
wasmer-engine-dylib = { path = "../lib/engine-dylib", optional = true }
|
||||
wasmer-middlewares = { path = "../lib/middlewares" }
|
||||
wasmprinter = "0.2"
|
||||
|
||||
@ -26,7 +26,7 @@ cranelift = [ "wasmer-compiler-cranelift" ]
|
||||
llvm = [ "wasmer-compiler-llvm" ]
|
||||
singlepass = [ "wasmer-compiler-singlepass" ]
|
||||
universal = [ "wasmer-engine-universal" ]
|
||||
shared-object = [ "wasmer-engine-shared-object" ]
|
||||
dylib = [ "wasmer-engine-dylib" ]
|
||||
|
||||
[[bin]]
|
||||
name = "equivalence_universal"
|
||||
@ -54,6 +54,6 @@ path = "fuzz_targets/metering.rs"
|
||||
required-features = ["universal", "cranelift"]
|
||||
|
||||
[[bin]]
|
||||
name = "shared_object_cranelift"
|
||||
path = "fuzz_targets/shared_object_cranelift.rs"
|
||||
required-features = ["shared-object", "cranelift"]
|
||||
name = "dylib_cranelift"
|
||||
path = "fuzz_targets/dylib_cranelift.rs"
|
||||
required-features = ["dylib", "cranelift"]
|
||||
|
@ -13,7 +13,7 @@ $ cargo install cargo-fuzz
|
||||
`cargo-fuzz` is documented in the [Rust Fuzz
|
||||
Book](https://rust-fuzz.github.io/book/cargo-fuzz.html).
|
||||
|
||||
## Running a fuzzer (`validate`, `universal_llvm`, `shared_object_cranelift`…)
|
||||
## Running a fuzzer (`validate`, `universal_llvm`, `dylib_cranelift`…)
|
||||
|
||||
Once `cargo-fuzz` is installed, you can run the `validate` fuzzer with
|
||||
```sh
|
||||
|
@ -4,7 +4,7 @@ use libfuzzer_sys::{arbitrary, arbitrary::Arbitrary, fuzz_target};
|
||||
use wasm_smith::{Config, ConfiguredModule};
|
||||
use wasmer::{imports, Instance, Module, Store};
|
||||
use wasmer_compiler_cranelift::Cranelift;
|
||||
use wasmer_engine_shared_object::SharedObject;
|
||||
use wasmer_engine_dylib::Dylib;
|
||||
|
||||
#[derive(Arbitrary, Debug, Default, Copy, Clone)]
|
||||
struct NoImportsConfig;
|
||||
@ -41,12 +41,12 @@ fuzz_target!(|module: WasmSmithModule| {
|
||||
}
|
||||
|
||||
let compiler = Cranelift::default();
|
||||
let store = Store::new(&SharedObject::new(compiler).engine());
|
||||
let store = Store::new(&Dylib::new(compiler).engine());
|
||||
let module = Module::new(&store, &wasm_bytes).unwrap();
|
||||
module.serialize().unwrap()
|
||||
};
|
||||
|
||||
let engine = SharedObject::headless().engine();
|
||||
let engine = Dylib::headless().engine();
|
||||
let store = Store::new(&engine);
|
||||
let module = unsafe { Module::deserialize(&store, serialized.as_slice()) }.unwrap();
|
||||
match Instance::new(&module, &imports! {}) {
|
Reference in New Issue
Block a user