百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

wasi-rs

> 编程语言
开源

Rust 的 WASI 绑定

363 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Rust 的 WASI 绑定

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustrustwasi

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言