Skip to content

add experimental wasi module support on top of wasm modules - #27850

Closed
devsnek wants to merge 1 commit into
nodejs:masterfrom
devsnek:feature/wasi
Closed

add experimental wasi module support on top of wasm modules#27850
devsnek wants to merge 1 commit into
nodejs:masterfrom
devsnek:feature/wasi

Conversation

@devsnek

@devsnekdevsnek commented May 24, 2019

Copy link
Copy Markdown
Member

@lukewagner@linclark@guybedford@tschneidereit@ofrobots

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@devsnekdevsnek added experimental Issues and PRs related to experimental features. esm Issues and PRs related to the ECMAScript Modules implementation. wasm Issues and PRs related to WebAssembly. labels May 24, 2019
@nodejs-github-bot

nodejs-github-bot commented May 24, 2019

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label May 24, 2019
@devsnek
devsnekforce-pushed the feature/wasi branch 2 times, most recently from 6cb5900 to 9304df9CompareMay 24, 2019 13:47
@devsnek

Copy link
Copy Markdown
MemberAuthor

i tried to set up the test/wasi directory but the test runner isn't recognizing test/wasi/test.js as a test file @nodejs/testing

Comment threadtest/wasi/test.js Outdated
Comment threadlib/internal/wasi.js Outdated
Comment threadtest/wasi/README.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/ \o/ Really excited this is testing and running vanilla clang/wasi-sysroot output.

@addaleaxaddaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Comment threadsrc/node_options.cc Outdated

@ofrobotsofrobots left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Thanks for putting this together. I'm experimenting with some 'real world' code that relies on this over at https://github.com/ofrobots/brotli-wasm.

Comment threadsrc/node_options.cc Outdated
Comment threadtest/wasi/test.js Outdated
@syrusakbary

Copy link
Copy Markdown

This is awesome! Great work on the PR 👏

@Trott

Trott commented Jun 1, 2019

Copy link
Copy Markdown
Member

i tried to set up the test/wasi directory but the test runner isn't recognizing test/wasi/test.js as a test file @nodejs/testing

Did this get resolved or is it still a problem?

@devsnek

Copy link
Copy Markdown
MemberAuthor

@Trott still a problem

@cjihrig

Copy link
Copy Markdown
Contributor

@devsnek, rename test/wasi/test.js to test/wasi/test-wasi.js (or something else that begins with test-) and it should work.

@devsnek

Copy link
Copy Markdown
MemberAuthor

@cjihrig i attempted to add seeking but the native function keeps returning undefined on success instead of the new offset ;(.

if anyone better with napi sees the bug please let me know

Comment threadsrc/node_wasi.cc Outdated
cjihrig added a commit to nodejs/wasi that referenced this pull request Sep 24, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Sep 25, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Sep 26, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Sep 30, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Sep 30, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 7, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 7, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 9, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 9, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
@devsnekdevsnek closed this Oct 11, 2019
@devsnek
devsnek deleted the feature/wasi branch October 11, 2019 23:04
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 14, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 14, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 15, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 15, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 28, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 28, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 30, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 30, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 31, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Oct 31, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Nov 2, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Nov 2, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Nov 4, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
cjihrig added a commit to nodejs/wasi that referenced this pull request Nov 4, 2019
This commit adds support for resolving symlinks during
path resolution. This commit also ports all of the remaining
tests from nodejs/node#27850, with
the 'poll' test currently disabled.
cjihrig added a commit to nodejs/wasi that referenced this pull request Nov 5, 2019
This commit ports the following tests from
nodejs/node#27850.
- clock_getres
- getentropy (currently disabled)
- getrusage
- gettimeofday
- notdir
- preopen_populates
- read_file_twice
- stat
- stdin
- write_file
This commit completes the implementations of
fd_filestat_get() and path_filestat_get(), which
are needed for the stat test. This commit also
adds clock_res_get() and partial clock_time_get()
support.
@cjihrigcjihrig mentioned this pull request Nov 5, 2019
4 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esmIssues and PRs related to the ECMAScript Modules implementation.experimentalIssues and PRs related to experimental features.lib / srcIssues and PRs related to general changes in the lib or src directory.semver-minorPRs that contain new features and should be released in the next minor version.wasmIssues and PRs related to WebAssembly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18 participants

@devsnek@nodejs-github-bot@syrusakbary@Trott@cjihrig@guybedford@sunfishcode@xtuc@tschneidereit@joyeecheung@littledan@MylesBorins@saghul@ofrobots@bnoordhuis@addaleax@MaxGraey@lukewagner