Registry / other / wasi
library0.14.7+wasi-0.2.4rscratesunverified

Rust bindings for the WebAssembly System Interface (WASI) API.

# Cargo.toml [dependencies] wasi = "0.14.7+wasi-0.2.4"
INSTALL
IMPORT
SIG · WASI
W
wasi
otherrustv0.14.7+wasi-0.2.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

wasi_snapshot_preview1
use wasi::wasi_snapshot_preview1::wasi_snapshot_preview1;

Access WASI environment variables.

use wasi::wasi_snapshot_preview1::*; // Example: get environment variables let mut buf = [0u8; 1024]; let mut environ_count: u32 = 0; let mut environ_buf_size: u32 = 0; unsafe { environ_sizes_get(&mut environ_count, &mut environ_buf_size); environ_get(&mut buf.as_mut_ptr(), &mut buf.as_mut_ptr().add(0)); }
Debug
Known issues
gotchaOnly works when compiled to a WASI target (e.g., wasm32-wasi).
fix
Set target to `wasm32-wasi` in your Cargo config or build command.
affects: *
Upgrade
Version history
0.14.7+wasi-0.2.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources