mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 05:31: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)",
|
||||
"wabt 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.4.2",
|
||||
"wasmer-dev-utils 0.4.2",
|
||||
"wasmer-emscripten 0.4.2",
|
||||
"wasmer-kernel-loader 0.1.0",
|
||||
"wasmer-llvm-backend 0.4.2",
|
||||
@ -2322,6 +2323,13 @@ dependencies = [
|
||||
"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]]
|
||||
name = "wasmer-emscripten"
|
||||
version = "0.4.2"
|
||||
@ -2334,6 +2342,7 @@ dependencies = [
|
||||
"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)",
|
||||
"wasmer-clif-backend 0.4.2",
|
||||
"wasmer-dev-utils 0.4.2",
|
||||
"wasmer-llvm-backend 0.4.2",
|
||||
"wasmer-runtime-core 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)",
|
||||
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wasmer-clif-backend 0.4.2",
|
||||
"wasmer-dev-utils 0.4.2",
|
||||
"wasmer-runtime-core 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-wasi = { path = "lib/wasi", optional = true }
|
||||
wasmer-kernel-loader = { path = "lib/kernel-loader", optional = true }
|
||||
wasmer-dev-utils = { path = "lib/dev-utils", 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/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]
|
||||
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]
|
||||
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]
|
||||
glob = "0.2.11"
|
||||
|
@ -6,9 +6,9 @@ macro_rules! assert_emscripten_output {
|
||||
generate_emscripten_env,
|
||||
};
|
||||
use wasmer_runtime_core::{
|
||||
stdio::StdioCapturer,
|
||||
backend::Compiler,
|
||||
};
|
||||
use wasmer_dev_utils::stdio::StdioCapturer;
|
||||
|
||||
#[cfg(feature = "clif")]
|
||||
fn get_compiler() -> impl Compiler {
|
||||
|
@ -49,5 +49,4 @@ blake2b_simd = "0.4.1"
|
||||
rustc_version = "0.2.3"
|
||||
|
||||
[features]
|
||||
debug = []
|
||||
regression-test = []
|
||||
debug = []
|
@ -18,8 +18,6 @@ pub mod cache;
|
||||
pub mod codegen;
|
||||
pub mod error;
|
||||
pub mod export;
|
||||
#[cfg(any(test, feature = "regression-test"))]
|
||||
pub mod file_descriptor;
|
||||
pub mod global;
|
||||
pub mod import;
|
||||
pub mod instance;
|
||||
@ -28,8 +26,6 @@ pub mod memory;
|
||||
pub mod module;
|
||||
pub mod parse;
|
||||
mod sig_registry;
|
||||
#[cfg(any(test, feature = "regression-test"))]
|
||||
pub mod stdio;
|
||||
pub mod structures;
|
||||
mod sys;
|
||||
pub mod table;
|
||||
|
@ -25,7 +25,7 @@ glob = "0.2.11"
|
||||
|
||||
[dev-dependencies]
|
||||
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]
|
||||
clif = []
|
||||
|
@ -1,6 +1,7 @@
|
||||
macro_rules! assert_wasi_output {
|
||||
($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;
|
||||
|
||||
#[cfg(feature = "clif")]
|
||||
|
Reference in New Issue
Block a user