mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 13:41:32 +00:00
move stdout capture from runtime core to dev-utils
This commit is contained in:
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -2287,6 +2287,7 @@ dependencies = [
|
|||||||
"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.2",
|
"wasmer-clif-backend 0.4.2",
|
||||||
|
"wasmer-dev-utils 0.4.2",
|
||||||
"wasmer-emscripten 0.4.2",
|
"wasmer-emscripten 0.4.2",
|
||||||
"wasmer-kernel-loader 0.1.0",
|
"wasmer-kernel-loader 0.1.0",
|
||||||
"wasmer-llvm-backend 0.4.2",
|
"wasmer-llvm-backend 0.4.2",
|
||||||
@ -2322,6 +2323,13 @@ dependencies = [
|
|||||||
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasmer-dev-utils"
|
||||||
|
version = "0.4.2"
|
||||||
|
dependencies = [
|
||||||
|
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasmer-emscripten"
|
name = "wasmer-emscripten"
|
||||||
version = "0.4.2"
|
version = "0.4.2"
|
||||||
@ -2334,6 +2342,7 @@ dependencies = [
|
|||||||
"time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
"time 0.1.42 (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.2",
|
"wasmer-clif-backend 0.4.2",
|
||||||
|
"wasmer-dev-utils 0.4.2",
|
||||||
"wasmer-llvm-backend 0.4.2",
|
"wasmer-llvm-backend 0.4.2",
|
||||||
"wasmer-runtime-core 0.4.2",
|
"wasmer-runtime-core 0.4.2",
|
||||||
"wasmer-singlepass-backend 0.4.2",
|
"wasmer-singlepass-backend 0.4.2",
|
||||||
@ -2480,6 +2489,7 @@ dependencies = [
|
|||||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wasmer-clif-backend 0.4.2",
|
"wasmer-clif-backend 0.4.2",
|
||||||
|
"wasmer-dev-utils 0.4.2",
|
||||||
"wasmer-runtime-core 0.4.2",
|
"wasmer-runtime-core 0.4.2",
|
||||||
"wasmer-singlepass-backend 0.4.2",
|
"wasmer-singlepass-backend 0.4.2",
|
||||||
]
|
]
|
||||||
|
@ -34,9 +34,10 @@ 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 }
|
||||||
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
||||||
|
wasmer-dev-utils = { path = "lib/dev-utils", 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/kernel-loader", "lib/kernel-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/kernel-net", "lib/dev-utils", "examples/plugin-for-example"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
wabt = "0.7.2"
|
wabt = "0.7.2"
|
||||||
|
11
lib/dev-utils/Cargo.toml
Normal file
11
lib/dev-utils/Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[package]
|
||||||
|
name = "wasmer-dev-utils"
|
||||||
|
version = "0.4.2"
|
||||||
|
description = "Wasmer runtime core library"
|
||||||
|
license = "MIT"
|
||||||
|
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||||
|
edition = "2018"
|
||||||
|
repository = "https://github.com/wasmerio/wasmer"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libc = "0.2.49"
|
3
lib/dev-utils/README.md
Normal file
3
lib/dev-utils/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Dev Utils
|
||||||
|
|
||||||
|
This is shared code between the modules for testing and development only. Code in this crate will not be shipped.
|
2
lib/dev-utils/src/lib.rs
Normal file
2
lib/dev-utils/src/lib.rs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
pub mod file_descriptor;
|
||||||
|
pub mod stdio;
|
@ -23,7 +23,7 @@ rand = "0.6"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
wabt = "0.7.2"
|
wabt = "0.7.2"
|
||||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.4.2", features = ["regression-test"] }
|
wasmer-dev-utils = { path = "../dev-utils", version = "0.4.2"}
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
glob = "0.2.11"
|
glob = "0.2.11"
|
||||||
|
@ -6,9 +6,9 @@ macro_rules! assert_emscripten_output {
|
|||||||
generate_emscripten_env,
|
generate_emscripten_env,
|
||||||
};
|
};
|
||||||
use wasmer_runtime_core::{
|
use wasmer_runtime_core::{
|
||||||
stdio::StdioCapturer,
|
|
||||||
backend::Compiler,
|
backend::Compiler,
|
||||||
};
|
};
|
||||||
|
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||||
|
|
||||||
#[cfg(feature = "clif")]
|
#[cfg(feature = "clif")]
|
||||||
fn get_compiler() -> impl Compiler {
|
fn get_compiler() -> impl Compiler {
|
||||||
|
@ -50,4 +50,3 @@ rustc_version = "0.2.3"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
debug = []
|
debug = []
|
||||||
regression-test = []
|
|
@ -18,8 +18,6 @@ pub mod cache;
|
|||||||
pub mod codegen;
|
pub mod codegen;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod export;
|
pub mod export;
|
||||||
#[cfg(any(test, feature = "regression-test"))]
|
|
||||||
pub mod file_descriptor;
|
|
||||||
pub mod global;
|
pub mod global;
|
||||||
pub mod import;
|
pub mod import;
|
||||||
pub mod instance;
|
pub mod instance;
|
||||||
@ -28,8 +26,6 @@ pub mod memory;
|
|||||||
pub mod module;
|
pub mod module;
|
||||||
pub mod parse;
|
pub mod parse;
|
||||||
mod sig_registry;
|
mod sig_registry;
|
||||||
#[cfg(any(test, feature = "regression-test"))]
|
|
||||||
pub mod stdio;
|
|
||||||
pub mod structures;
|
pub mod structures;
|
||||||
mod sys;
|
mod sys;
|
||||||
pub mod table;
|
pub mod table;
|
||||||
|
@ -25,7 +25,7 @@ glob = "0.2.11"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
wasmer-clif-backend = { path = "../clif-backend", version = "0.4.2" }
|
wasmer-clif-backend = { path = "../clif-backend", version = "0.4.2" }
|
||||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.4.2", features = ["regression-test"] }
|
wasmer-dev-utils = { path = "../dev-utils", version = "0.4.2"}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
clif = []
|
clif = []
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
macro_rules! assert_wasi_output {
|
macro_rules! assert_wasi_output {
|
||||||
($file:expr, $name:expr, $args:expr, $expected:expr) => {{
|
($file:expr, $name:expr, $args:expr, $expected:expr) => {{
|
||||||
use wasmer_runtime_core::{backend::Compiler, stdio::StdioCapturer, Func};
|
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||||
|
use wasmer_runtime_core::{backend::Compiler, Func};
|
||||||
use wasmer_wasi::generate_import_object;
|
use wasmer_wasi::generate_import_object;
|
||||||
|
|
||||||
#[cfg(feature = "clif")]
|
#[cfg(feature = "clif")]
|
||||||
|
Reference in New Issue
Block a user