tree: fc40e64f4c8af9921ea25df73e2c39b5875088fb [path history] [tgz]
  1. src/
  2. .cargo-checksum.json
  3. 0001-maybe.patch
  4. Cargo.toml
  5. clip.log
  6. CODE_OF_CONDUCT.md
  7. CONTRIBUTING.md
  8. LICENSE-APACHE
  9. LICENSE-Apache-2.0_WITH_LLVM-exception
  10. LICENSE-MIT
  11. old-bitflags.patch
  12. README.md
  13. rusty-tags.vi
third_party/rust_crates/vendor/wasi/README.md

WASI API Bindings for Rust

This package contains experimental WASI API bindings in Rust.

There are two modules:

  • wasi_unstable::raw, which provides raw access to the literal binding to the API. These functions are unsafe and use raw pointers.

  • wasi_unstable, which provides thin wrappers around the raw functions which use idiomatic Rust types rather than raw pointers, and are safe.

This crate is quite low-level and provides conceptually a “system call” interface. In most settings, it's better to use the Rust standard library, which has WASI support.

To compile Rust projects to wasm using WASI, use the wasm32-wasi target, like this:

rustup target add wasm32-wasi
cargo build --target wasm32-wasi