pchickey / rust-wasi

Experimental WASI API bindings for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wasi

A Bytecode Alliance project

WASI API Bindings for Rust

Crates.io version Download docs.rs docs

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

About

Experimental WASI API bindings for Rust

License:Apache License 2.0


Languages

Language:Rust 100.0%