-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Start to update the wasi
crate in wasi tests
#675
Start to update the wasi
crate in wasi tests
#675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know one could depend on two versions of the same crate at once, cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all, this looks great to me, awesome job, thanks @alexcrichton! Just to strengthen my understanding though, did I get it right that we instantiate both snapshots as two Wasm modules, and then a test picks the correct one at runtime?
Indeed! Basically both snapshots are available under their respective modules, and depending on the name imported the test gets the respective functionality. |
Updated! |
Hmm, after careful re-read of your comments in the issue referenced, I'm thinking it would be worth finishing what you've started here and rewriting all of the remaining tests to indeed use |
LGTM! I'm happy to merge it as-is! |
Leave space for the new `wasi` crate but allow us to incrementally update tests.
298fc23
to
eed5f6b
Compare
I've rebased to current master and fast-forwarded to latest Wasmtime API changes, and will merge as-is. |
This commit starts an update where all the
wasi-tests/src/bin/*.rs
programs are updated to the newest snapshot of the wasi API, rather tan using the old snapshot 0.Not all tests are updated, and there's a few changes here:
wasi_old
and the 0.9.0 version is now known as just normalwasi
.wasi
rather thanwasi_old
open_scratch_directory
function had to get a duplicate which uses the most recent snapshot's file descriptors.The purpose of this PR is to start us down the road of updating these tests, allowing the update to happen in parallel for each test. Also to get some early feedback!