wasi example: theres lots of useful tracing messages for debugging
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -2419,6 +2419,8 @@ dependencies = [
|
|||||||
"target-lexicon",
|
"target-lexicon",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"test-programs",
|
"test-programs",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
"wasi-common",
|
"wasi-common",
|
||||||
"wasmtime",
|
"wasmtime",
|
||||||
"wasmtime-cache",
|
"wasmtime-cache",
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ tempfile = "3.1.0"
|
|||||||
test-programs = { path = "crates/test-programs" }
|
test-programs = { path = "crates/test-programs" }
|
||||||
wasmtime-fuzzing = { path = "crates/fuzzing" }
|
wasmtime-fuzzing = { path = "crates/fuzzing" }
|
||||||
wasmtime-runtime = { path = "crates/runtime" }
|
wasmtime-runtime = { path = "crates/runtime" }
|
||||||
|
tracing = "0.1.12"
|
||||||
|
tracing-subscriber = "0.2.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
anyhow = "1.0.19"
|
anyhow = "1.0.19"
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ use wasmtime::*;
|
|||||||
use wasmtime_wasi::{Wasi, WasiCtx};
|
use wasmtime_wasi::{Wasi, WasiCtx};
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
|
tracing_subscriber::FmtSubscriber::builder()
|
||||||
|
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
|
||||||
|
.with_ansi(true)
|
||||||
|
.init();
|
||||||
|
|
||||||
let store = Store::default();
|
let store = Store::default();
|
||||||
let mut linker = Linker::new(&store);
|
let mut linker = Linker::new(&store);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user