You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Dan Gohman 251504e8a7
Merge pull request #11 from CraneStation/docs
6 years ago
src Insulate API from intricacies of memory mgmt of calling runtimes 6 years ago
.gitignore remove rustfmt file from .gitignore 6 years ago
.rustfmt.toml Set up CI, add format and test scripts. 6 years ago
.travis.yml Cleanup docs; specify minimum Rust version 6 years ago
CODE_OF_CONDUCT.md Add contributing guide and code of conduct 6 years ago
CONTRIBUTING.md Add contributing guide and code of conduct 6 years ago
Cargo.toml Set up CI, add format and test scripts. 6 years ago
LICENSE Extract common interface from lucet-wasi 6 years ago
LICENSE.cloudabi-utils Eliminate whitespace diffs with upstream LICENSE files. 6 years ago
README.md Cleanup docs; specify minimum Rust version 6 years ago
clippy.toml Set up CI, add format and test scripts. 6 years ago
format-all.sh Set up CI, add format and test scripts. 6 years ago
test-all.sh Set up CI, add format and test scripts. 6 years ago

README.md

wasi-common

build-status rustc-1.34

This repo will ultimately serve as a library providing a common implementation of WASI hostcalls for re-use in any WASI (and potentially non-WASI) runtimes such as Wasmtime and Lucet.

The library is an adaption of lucet-wasi crate from the Lucet project, and it is currently based on 5d3efb6005 git revision.

Please note that the library requires Rust compiler version at least 1.34.0.

Supported syscalls

We support a subset of the WASI API, though we are working on new hostcalls on a regular basis. We currently implement:

  • __wasi_args_get
  • __wasi_args_sizes_get
  • __wasi_clock_res_get
  • __wasi_clock_time_get
  • __wasi_environ_get
  • __wasi_environ_sizes_get
  • __wasi_fd_close
  • __wasi_fd_fdstat_get
  • __wasi_fd_fdstat_set_flags
  • __wasi_fd_filestat_get
  • __wasi_fd_prestat_dir_name
  • __wasi_fd_prestat_get
  • __wasi_fd_read
  • __wasi_fd_seek
  • __wasi_fd_write
  • __wasi_path_open
  • __wasi_path_filestat_get
  • __wasi_path_create_directory
  • __wasi_path_unlink_file
  • __wasi_poll_oneoff
  • __wasi_proc_exit
  • __wasi_random_get

This is enough to run basic C and Rust programs, including those that use command-line arguments, environment variables, stdio, and basic file operations.

Third-Party Code

Significant parts of our hostcall implementations are derived from the C implementations in cloudabi-utils. See LICENSE.cloudabi-utils for license information.