port command and example to use sync wasmtime_wasi
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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};
|
||||||
|
|||||||
Reference in New Issue
Block a user