Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions crates/wasi-common/src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ use std::sync::{Arc, RwLock};
/// ```no_run
/// use wasi_common::{pipe::ReadPipe, WasiCtx, Table};
/// let stdin = ReadPipe::from("hello from stdin!");
/// // Brint these instances from elsewhere (e.g. wasi-cap-std-sync):
/// let random = todo!();
/// let clocks = todo!();
/// let sched = todo!();
/// // Bring these instances from elsewhere (e.g. wasi-cap-std-sync or wasi-cap-std-tokio):
/// use wasi_common::sync::{random_ctx, clocks_ctx, sched_ctx};
/// let random = random_ctx();
/// let clocks = clocks_ctx();
/// let sched = sched_ctx();
/// let table = Table::new();
/// let mut ctx = WasiCtx::new(random, clocks, sched, table);
/// ctx.set_stdin(Box::new(stdin.clone()));
Expand Down Expand Up @@ -116,10 +117,11 @@ impl<R: Read + Any + Send + Sync> WasiFile for ReadPipe<R> {
/// ```no_run
/// use wasi_common::{pipe::WritePipe, WasiCtx, Table};
/// let stdout = WritePipe::new_in_memory();
/// // Brint these instances from elsewhere (e.g. wasi-cap-std-sync):
/// let random = todo!();
/// let clocks = todo!();
/// let sched = todo!();
/// // Bring these instances from elsewhere (e.g. wasi-cap-std-sync or wasi-cap-std-tokio):
/// use wasi_common::sync::{random_ctx, clocks_ctx, sched_ctx};
/// let random = random_ctx();
/// let clocks = clocks_ctx();
/// let sched = sched_ctx();
/// let table = Table::new();
/// let mut ctx = WasiCtx::new(random, clocks, sched, table);
/// ctx.set_stdout(Box::new(stdout.clone()));
Expand Down