diff options
| author | Mica White <botahamec@outlook.com> | 2026-10-31 11:10:49 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-10-31 11:10:49 -0400 |
| commit | 264ea48cc8c6dd9c3c9e0fe1a559252863fc9962 (patch) | |
| tree | 84a4a58de14442f4fcfa06bd0d82480508f82759 /crates/wasi/src/p1/mod.rs | |
| parent | 7877eca4e8be283e7c51168ee3a3b05d9000f39c (diff) | |
| parent | b45a98a85c776d956a797773acd2f198c06b40ed (diff) | |
Merge branch 'main' into bota-tortuise
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); +} |
