diff options
| author | Henry <mail@henrygressmann.de> | 2026-09-15 15:23:11 +0200 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2026-09-15 15:27:00 +0200 |
| commit | dc8e5732d71b6f66e730b090ab02bdccc69ec888 (patch) | |
| tree | 1c48f5b6d785517fbccf7fb62806bb3ec6c22b2d /crates/wasi/src/p1/mod.rs | |
| parent | 741955aed21c814a0805386a4f9be997c2eb1199 (diff) | |
feat: initial wasi p1 implementation
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/wasi/src/p1/mod.rs')
| -rw-r--r-- | crates/wasi/src/p1/mod.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/wasi/src/p1/mod.rs b/crates/wasi/src/p1/mod.rs new file mode 100644 index 0000000..8a852e8 --- /dev/null +++ b/crates/wasi/src/p1/mod.rs @@ -0,0 +1,22 @@ +//! Synchronous WASI Preview 1 command support. + +mod abi; +mod ctx; +mod imports; +mod memory; + +pub use ctx::{WasiCtx, WasiCtxError}; + +use tinywasm::Imports; + +/// Creates a new [`Imports`] object with the WASI Preview 1 namespace registered. +pub fn imports() -> Imports { + let mut imports = Imports::new(); + register(&mut imports); + imports +} + +/// Registers the frozen WASI Preview 1 namespace on an [`Imports`] object. +pub fn register(imports: &mut Imports) { + self::imports::register(imports); +} |
