WebAssembly System Interface implementation in Rust - vendored from github.com/bytecodealliance/wasi-rs
  • Rust 99.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alex Crichton 660ee064e2
Some checks failed
CI / Test WASIp2 on beta (push) Has been cancelled
CI / Test WASIp2 on nightly (push) Has been cancelled
CI / Test WASIp2 on stable (push) Has been cancelled
CI / Build wasi on beta (push) Has been cancelled
CI / Build wasi on msrv (push) Has been cancelled
CI / Build wasi on nightly (push) Has been cancelled
CI / Build wasi on stable (push) Has been cancelled
CI / Build wasip1 on beta (push) Has been cancelled
CI / Build wasip1 on msrv (push) Has been cancelled
CI / Build wasip1 on nightly (push) Has been cancelled
CI / Build wasip1 on stable (push) Has been cancelled
CI / Build wasip2 on beta (push) Has been cancelled
CI / Build wasip2 on msrv (push) Has been cancelled
CI / Build wasip2 on nightly (push) Has been cancelled
CI / Build wasip2 on stable (push) Has been cancelled
CI / Build wasip3 on beta (push) Has been cancelled
CI / Build wasip3 on nightly (push) Has been cancelled
CI / Build wasip3 on stable (push) Has been cancelled
CI / Ensure generated code up-to-date (push) Has been cancelled
CI / Test WASIp3 on beta (push) Has been cancelled
CI / Test WASIp3 on nightly (push) Has been cancelled
Bump version numbers of wasip2/wasip3 (#155)
* Minor bump of wasip2 as wit-bindgen isn't a public dep
* Major bump of wasip3 as wit-bindgen is a public dep (e.g.
  future/stream types)
2026-04-18 00:16:36 +02:00
.github Update wit-bindgen to 0.57.1 (#154) 2026-04-17 12:56:43 -05:00
ci Update wit-bindgen, make wasip3 no_std compatible (#153) 2026-04-17 10:50:07 -05:00
crates Bump version numbers of wasip2/wasip3 (#155) 2026-04-18 00:16:36 +02:00
examples Develop bindings for WASI versions in parallel (#118) 2025-09-09 19:57:45 +02:00
src Add #![no_std] (#121) 2025-09-16 00:00:39 +02:00
.gitattributes Add a wasip3 crate alongside others (#111) 2025-09-09 21:49:55 +02:00
.gitignore Initial commit. 2019-07-11 11:21:40 -07:00
Cargo.toml Update wit-bindgen to 0.57.1 (#154) 2026-04-17 12:56:43 -05:00
CODE_OF_CONDUCT.md Make it a Bytecode Alliance project (#18) 2019-11-12 07:59:13 -08:00
CONTRIBUTING.md Add CONTRIBUTING.md and CODE_OF_CONDUCT.md files. 2019-07-11 11:35:18 -07:00
LICENSE-APACHE Change license to (Apache-2.0 WITH LLVM-exception) OR Apache-2.0 OR MIT 2019-08-29 05:14:55 -07:00
LICENSE-Apache-2.0_WITH_LLVM-exception Change license to (Apache-2.0 WITH LLVM-exception) OR Apache-2.0 OR MIT 2019-08-29 05:14:55 -07:00
LICENSE-MIT Change license to (Apache-2.0 WITH LLVM-exception) OR Apache-2.0 OR MIT 2019-08-29 05:14:55 -07:00
ORG_CODE_OF_CONDUCT.md Make it a Bytecode Alliance project (#18) 2019-11-12 07:59:13 -08:00
README.md Do a pass over READMEs for more information (#142) 2026-01-30 15:23:16 +01:00
SECURITY.md Make it a Bytecode Alliance project (#18) 2019-11-12 07:59:13 -08:00

wasi

A Bytecode Alliance project

WASI API Bindings for Rust

Crates.io version Download docs.rs docs

This repository contains low-level Rust bindings to WASI APIs which are distributed and published to crates on crates.io. Crates currently are:

  • wasi - this is a reexport of the latest stable WASI proposal. At this time this represents bindings to WASIp2.
  • wasip1 - this crate explicitly contains bindings for the WASIp1 snapshot. Development of the WASIp1 version of the standard has ceased and this crate is in maintenance mode.
  • wasip2 - this crate explicitly contains bindings for the latest stable WASIp2 release generated by the latest stable wit-bindgen release.
  • wasip3 - contains the latest snapshot of the WASIp3 APIs using the latest wit-bindgen.

The wasi crate

The wasi crate today is a lightweight reexport of the latest stable version of the WASI standard. Currently that is WASIp2. The wasi crate version number will be bumped every timet he wasip2 crate version number is bumped, for example, and its interface and bindings may change over time as WASIp2 APIs are added or the wit-bindgen tool to generate bindings evolves.

To explicitly indicate which version of the WASI standard you'd like to use it's recommended to use the wasip2 crate directly.

Crate version numbers

The wasi crate contains "build metadata" which indicates what version of the WASI standard it contains bindings for. This metadata is purely informational and cannot be used to constrain a version requirement in Cargo. This scheme is mirrored for the wasip2 crate as well, for example.

Which crate to use?

The most appropriate crate to use depends on the WebAssembly Rust target that you're compiling with:

  • wasm32-unknown-unknown - don't use any of these crates in this repository as WASI is typically not intended to be used with this target.
  • wasm32-wasip1 - use the wasip1 crate, as other crates are based on component APIs which this target does not use.
  • wasm32-wasip2 - use the wasip2 crate and update as-needed to newer versions.
  • wasm32-wasip3 - use the wasip3 crate.

For component-producing targets, for example wasm32-wasip2 and wasm32-wasip3, you can technically use any of wasip2, wasip3, or wasi. It's recommended where possible to stick with the target, however.

License

This project is licensed under the Apache 2.0 license with the LLVM exception. See LICENSE for more details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.