port command and example to use sync wasmtime_wasi

This commit is contained in:
Pat Hickey
2021-04-13 12:42:00 -07:00
parent 2b7a93c403
commit bac02c50f2
2 changed files with 2 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
use anyhow::Result; use anyhow::Result;
use wasmtime::*; use wasmtime::*;
use wasmtime_wasi::{sync::WasiCtxBuilder, Wasi}; use wasmtime_wasi::sync::{Wasi, WasiCtxBuilder};
fn main() -> Result<()> { fn main() -> Result<()> {
tracing_subscriber::FmtSubscriber::builder() tracing_subscriber::FmtSubscriber::builder()

View File

@@ -11,10 +11,7 @@ use std::{
}; };
use structopt::{clap::AppSettings, StructOpt}; use structopt::{clap::AppSettings, StructOpt};
use wasmtime::{Engine, Func, Linker, Module, Store, Trap, Val, ValType}; use wasmtime::{Engine, Func, Linker, Module, Store, Trap, Val, ValType};
use wasmtime_wasi::{ use wasmtime_wasi::sync::{Dir, Wasi, WasiCtxBuilder};
sync::{Dir, WasiCtxBuilder},
Wasi,
};
#[cfg(feature = "wasi-nn")] #[cfg(feature = "wasi-nn")]
use wasmtime_wasi_nn::{WasiNn, WasiNnCtx}; use wasmtime_wasi_nn::{WasiNn, WasiNnCtx};