mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-29 09:51:19 +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)",
|
"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]]
|
[[package]]
|
||||||
name = "kwasm-net"
|
name = "kwasm-net"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -2291,12 +2283,12 @@ dependencies = [
|
|||||||
"errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wasmer-clif-backend 0.4.1",
|
"wasmer-clif-backend 0.4.1",
|
||||||
"wasmer-emscripten 0.4.1",
|
"wasmer-emscripten 0.4.1",
|
||||||
|
"wasmer-kernel-loader 0.1.0",
|
||||||
"wasmer-llvm-backend 0.4.1",
|
"wasmer-llvm-backend 0.4.1",
|
||||||
"wasmer-middleware-common 0.4.1",
|
"wasmer-middleware-common 0.4.1",
|
||||||
"wasmer-runtime 0.4.1",
|
"wasmer-runtime 0.4.1",
|
||||||
@ -2347,6 +2339,14 @@ dependencies = [
|
|||||||
"wasmer-singlepass-backend 0.4.1",
|
"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]]
|
[[package]]
|
||||||
name = "wasmer-llvm-backend"
|
name = "wasmer-llvm-backend"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
|
@ -33,10 +33,10 @@ wasmer-runtime-core = { path = "lib/runtime-core" }
|
|||||||
wasmer-emscripten = { path = "lib/emscripten" }
|
wasmer-emscripten = { path = "lib/emscripten" }
|
||||||
wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
|
wasmer-llvm-backend = { path = "lib/llvm-backend", optional = true }
|
||||||
wasmer-wasi = { path = "lib/wasi", 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]
|
[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]
|
[build-dependencies]
|
||||||
wabt = "0.7.2"
|
wabt = "0.7.2"
|
||||||
@ -45,7 +45,7 @@ rustc_version = "0.2.3"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["fast-tests", "wasi"]
|
default = ["fast-tests", "wasi"]
|
||||||
"loader:kwasm" = ["kwasm-loader"]
|
"loader:kwasm" = ["wasmer-kernel-loader"]
|
||||||
debug = ["wasmer-runtime-core/debug"]
|
debug = ["wasmer-runtime-core/debug"]
|
||||||
extra-debug = ["wasmer-clif-backend/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
|
# This feature will allow cargo test to run much faster
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kwasm-loader"
|
name = "wasmer-kernel-loader"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Heyang Zhou <zhy20000919@hotmail.com>"]
|
authors = ["Heyang Zhou <zhy20000919@hotmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
@ -60,7 +60,7 @@ fn handle_client(mut stream: UnixStream) {
|
|||||||
let mut import_object = wasmer_runtime_core::import::ImportObject::new();
|
let mut import_object = wasmer_runtime_core::import::ImportObject::new();
|
||||||
import_object.allow_missing_functions = true; // Import initialization might be left to the loader.
|
import_object.allow_missing_functions = true; // Import initialization might be left to the loader.
|
||||||
let instance = module.instantiate(&import_object).unwrap();
|
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 {
|
loop {
|
||||||
let cmd = stream.read_u32::<LittleEndian>().unwrap();
|
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 {
|
let mut ins: Box<LoadedInstance<Error = String>> = match loader {
|
||||||
LoaderName::Local => Box::new(instance.load(LocalLoader).unwrap()),
|
LoaderName::Local => Box::new(instance.load(LocalLoader).unwrap()),
|
||||||
#[cfg(feature = "loader:kwasm")]
|
#[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));
|
println!("{:?}", ins.call(index, &args));
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user