From b59160c3da61c89cb94cefd31a4d71002d099e5b Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Mon, 1 Feb 2021 18:14:26 -0800 Subject: [PATCH] docs! --- crates/wasi/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/wasi/src/lib.rs b/crates/wasi/src/lib.rs index f6b446076a..89ee09ed1c 100644 --- a/crates/wasi/src/lib.rs +++ b/crates/wasi/src/lib.rs @@ -1,3 +1,12 @@ +//! `wasmtime-wasi` now supports using multiple snapshots to interface to the +//! same `WasiCtx`! +//! +//! `wasmtime_wasi::Wasi::new(&Store, WasiCtx)` is a struct which owns your +//! `WasiCtx` and provides linkage to every available snapshot. +//! +//! Individual snapshots are available through +//! `wasmtime_wasi::snapshots::preview_{0, 1}::Wasi::new(&Store, Rc>)`. + use std::cell::RefCell; use std::rc::Rc; pub use wasi_common::{Error, WasiCtx, WasiCtxBuilder, WasiDir, WasiFile};