Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve WASI implementation #4

Merged
merged 24 commits into from
Jan 1, 2022
Merged

Improve WASI implementation #4

merged 24 commits into from
Jan 1, 2022

Conversation

turbolent
Copy link
Owner

@turbolent turbolent commented Dec 28, 2021

Implement enough of the WASI spec to get e.g. clang.wasm running

Proc

  • wasi_unstable.proc_exit

Environ

  • wasi_unstable.environ_sizes_get
  • wasi_unstable.environ_get

Args

  • wasi_unstable.args_sizes_get
  • wasi_unstable.args_get

Clock

  • wasi_unstable.clock_time_get

Random

  • wasi_unstable.random_get

Poll

  • wasi_unstable.poll_oneoff

FD

  • wasi_unstable.fd_write
  • wasi_unstable.fd_close
  • wasi_unstable.fd_seek
  • wasi_unstable.fd_fdstat_get
  • wasi_unstable.fd_filestat_get
  • wasi_unstable.fd_pread
  • wasi_unstable.fd_read
  • wasi_unstable.fd_readdir
  • wasi_unstable.fd_fdstat_set_flags
  • wasi_unstable.fd_prestat_get
  • wasi_unstable.fd_prestat_dir_name

Path

  • wasi_unstable.path_open
  • wasi_unstable.path_filestat_get
  • wasi_unstable.path_rename
  • wasi_unstable.path_unlink_file
  • wasi_unstable.path_remove_directory
  • wasi_unstable.path_create_directory
  • wasi_unstable.path_readlink
  • wasi_unstable.path_symlink

@trevor403
Copy link

This is great work, let me know if you'd like help with anything... I might have a fd_readdir impl from an old project.

@turbolent
Copy link
Owner Author

@trevor403 Great to hear, that would be much welcomed!

@turbolent turbolent marked this pull request as ready for review January 1, 2022 19:11
@turbolent
Copy link
Owner Author

clang.wasm can now compile a hello world C program into a WebAssembly object file. The remaining functions are apparently not needed, but should be still added eventually.

@turbolent turbolent merged commit 7f51f07 into main Jan 1, 2022
@turbolent turbolent deleted the wasi branch January 1, 2022 19:13
@turbolent turbolent added the enhancement New feature or request label Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants