mirror of
https://github.com/fluencelabs/wasmer
synced 2025-04-24 18:02:13 +00:00
Rename kwasm-loader
to wasmer-kernel-loader
.
This commit is contained in:
parent
d75a2925af
commit
d72abf3203
18
Cargo.lock
generated
18
Cargo.lock
generated
@ -925,14 +925,6 @@ dependencies = [
|
||||
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kwasm-loader"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kwasm-net"
|
||||
version = "0.1.0"
|
||||
@ -2291,12 +2283,12 @@ dependencies = [
|
||||
"errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hashbrown 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kwasm-loader 0.1.0",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"structopt 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.4.1",
|
||||
"wasmer-emscripten 0.4.1",
|
||||
"wasmer-kernel-loader 0.1.0",
|
||||
"wasmer-llvm-backend 0.4.1",
|
||||
"wasmer-middleware-common 0.4.1",
|
||||
"wasmer-runtime 0.4.1",
|
||||
@ -2347,6 +2339,14 @@ dependencies = [
|
||||
"wasmer-singlepass-backend 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-kernel-loader"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-runtime-core 0.4.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-llvm-backend"
|
||||
version = "0.4.1"
|
||||
|
@ -33,10 +33,10 @@ wasmer-runtime-core = { path = "lib/runtime-core" }
|
||||
wasmer-emscripten = { path = "lib/emscripten" }
|
||||
wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
|
||||
wasmer-wasi = { path = "lib/wasi", optional = true }
|
||||
kwasm-loader = { path = "lib/kwasm-loader", optional = true }
|
||||
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
||||
|
||||
[workspace]
|
||||
members = ["lib/clif-backend", "lib/singlepass-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi", "lib/middleware-common", "lib/kwasm-loader", "lib/kwasm-net", "examples/plugin-for-example"]
|
||||
members = ["lib/clif-backend", "lib/singlepass-backend", "lib/runtime", "lib/runtime-abi", "lib/runtime-core", "lib/emscripten", "lib/spectests", "lib/win-exception-handler", "lib/runtime-c-api", "lib/llvm-backend", "lib/wasi", "lib/middleware-common", "lib/kernel-loader", "lib/kwasm-net", "examples/plugin-for-example"]
|
||||
|
||||
[build-dependencies]
|
||||
wabt = "0.7.2"
|
||||
@ -45,7 +45,7 @@ rustc_version = "0.2.3"
|
||||
|
||||
[features]
|
||||
default = ["fast-tests", "wasi"]
|
||||
"loader:kwasm" = ["kwasm-loader"]
|
||||
"loader:kwasm" = ["wasmer-kernel-loader"]
|
||||
debug = ["wasmer-runtime-core/debug"]
|
||||
extra-debug = ["wasmer-clif-backend/debug", "wasmer-runtime-core/debug"]
|
||||
# This feature will allow cargo test to run much faster
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "kwasm-loader"
|
||||
name = "wasmer-kernel-loader"
|
||||
version = "0.1.0"
|
||||
authors = ["Heyang Zhou <zhy20000919@hotmail.com>"]
|
||||
edition = "2018"
|
@ -60,7 +60,7 @@ fn handle_client(mut stream: UnixStream) {
|
||||
let mut import_object = wasmer_runtime_core::import::ImportObject::new();
|
||||
import_object.allow_missing_functions = true; // Import initialization might be left to the loader.
|
||||
let instance = module.instantiate(&import_object).unwrap();
|
||||
let mut ins = instance.load(::kwasm_loader::KernelLoader).unwrap();
|
||||
let mut ins = instance.load(::wasmer_kernel_loader::KernelLoader).unwrap();
|
||||
|
||||
loop {
|
||||
let cmd = stream.read_u32::<LittleEndian>().unwrap();
|
||||
|
@ -387,7 +387,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
||||
let mut ins: Box<LoadedInstance<Error = String>> = match loader {
|
||||
LoaderName::Local => Box::new(instance.load(LocalLoader).unwrap()),
|
||||
#[cfg(feature = "loader:kwasm")]
|
||||
LoaderName::Kernel => Box::new(instance.load(::kwasm_loader::KernelLoader).unwrap()),
|
||||
LoaderName::Kernel => Box::new(instance.load(::wasmer_kernel_loader::KernelLoader).unwrap()),
|
||||
};
|
||||
println!("{:?}", ins.call(index, &args));
|
||||
return Ok(());
|
||||
|
Loading…
x
Reference in New Issue
Block a user