-
Notifications
You must be signed in to change notification settings - Fork 824
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
Base support for WASI in wasmer-js #2491
Merged
Merged
Changes from all commits
Commits
Show all changes
90 commits
Select commit
Hold shift + click to select a range
4200f2e
Base support for WASI in wasmer-js
syrusakbary 65dacb5
Removed unnecessary comments
syrusakbary 2e9cc52
Fix format
syrusakbary 58bd122
Commented unused code
syrusakbary 576312e
Get serializer back into working
syrusakbary fb616cf
Improved default fs backing
syrusakbary e79b8a0
Make WASI serialization optional
syrusakbary b2b576f
Removed all warnings
syrusakbary f15f9de
Fixed most TODOs
syrusakbary c810940
Remove WASI rename_file default implementation
syrusakbary 1855700
Fix compilation
syrusakbary 876eefe
Improved logging for tests
syrusakbary 75340e1
Moved rename_file to the filesystem. Fix fs readdir
syrusakbary 616d199
Fix compilation/linting issues
syrusakbary cc6013c
Ignore some tests for now
syrusakbary 55ff142
Fix compilation in windows
syrusakbary d371fd2
Fixed tests
syrusakbary 5120b71
Disabled mem_fs by default
syrusakbary fe49a91
Fixed wasmer-js
syrusakbary 03e3af4
Fixed build wasmer in debug mode
syrusakbary fa1c634
Merge branch 'master' into js-api-wasi-base
syrusakbary 926df5c
Added into js::Object for the ImportObject
syrusakbary 67e24c3
Update lib/vfs/src/host_fs.rs
syrusakbary ea26266
fix(vfs) Remove the commented `vfs` virtual FS.
Hywan f639dd9
fix(vfs) Make `host_fs` the default file system.
Hywan 52be548
feat(vfs) Make `host_fs` and `mem_fs` mutually exclusives.
Hywan 5b53c54
fix(c-api,cli) Use the default features from `wasmer-wasi`.
Hywan 6ff50be
feat: Replace `fs_metadata_to_metadata` by a `TryInto` implementation.
Hywan fde80a8
chore(vfs) Use `fs` rather than `std::fs`.
Hywan 56b007a
Merge pull request #2526 from Hywan/chore-vfs-use-std-fs-alias
syrusakbary 29af515
Merge pull request #2525 from Hywan/feat-vfs-host-tryfrom-metadata
syrusakbary 9827358
Merge pull request #2522 from Hywan/fix-vfs-remove-vfs
syrusakbary b4a7c35
Update lib/wasi/Cargo.toml
syrusakbary 0a1ad75
Merge branch 'js-api-wasi' into fix-vfs-make-features-exclusive
Hywan 0172463
feat(vfs) `host_fs` and `mem_fs` are not mutually exclusive.
Hywan 2240fa9
Merge pull request #2523 from Hywan/fix-vfs-make-features-exclusive
Hywan f211130
feat(vfs) Unified API.
Hywan 5583631
Merge branch 'js-api-wasi' into feat-vfs-unified-fd
Hywan ab83efe
Fix merge conflict.
Hywan 9e6c07d
Fix merge conflict.
Hywan ff9c7f1
fix(vfs) Change `FileDescriptor` to be unit.
Hywan cbc20c1
Merge pull request #2528 from Hywan/feat-vfs-unified-fd
Hywan d0fe468
fix(wasi) Re-organize the Cargo features.
Hywan 2d8996a
fix(wasi) Update according to the changes made earlier.
Hywan dd80b39
Merge pull request #2529 from Hywan/fix-vfs-wasi-default-features
Hywan 20d20ed
fix(vfs) Do not unwrap in `create_dir` when the path has a parent not…
Hywan 3017a37
test(vfs) Add tests for `FileSystem::craete_dir`.
Hywan 56d2cf0
fix(vfs) Do not unwrap in `remove_dir`.
Hywan 743e302
test(vfs) Add test cases for `mem_fs::FileSystem::remove_dir`.
Hywan e617937
feat(vfs) Rewrite the in-memory filesystem.
Hywan e011c3b
Merge pull request #3 from Hywan/feat-vfs-mem-reboot
Hywan 9e6a427
feat(vfs) Continue the rewrite of the in-memory filesystem.
Hywan b66e591
Merge branch 'test-vfs-mem' of github.com:Hywan/wasmer into test-vfs-mem
Hywan 047256f
feat(vfs) Continue the rewrite of the in-memory filesystem.
Hywan 3d69ec7
chore(carg) Updating `crossbeam-deque.
Hywan 45e0340
chore(cargo) Solve RUSTSEC-2021-0080 by updating `tar`.
Hywan 31f5c1a
fix(vfs) Fix a type error on Windows.
Hywan bea626b
fix(vfs) Add the `no-time` feature if `std::time` is not available.
Hywan 2df47f6
fix(vfs) Correct support of Windows for `FileDescriptor`.
Hywan d8c4cc4
feat(wasi) Clarify an error message.
Hywan bfbdf01
!debug
Hywan 0613f87
fix(vfs) Metadata returns 0 for accessed & co times on error.
Hywan 9741c28
test: Update the Github Actions workflow files.
Hywan 7cbff0f
chore(makefile) Print `rustc` and `node` versions.
Hywan 2a246cf
!undebug
Hywan ac95425
test(vfs) Turn on `host-fs` _and_ `mem-fs` on by default.
Hywan fbe6a04
Merge pull request #2530 from Hywan/test-vfs-mem
Hywan 71e0da5
Update Makefile
Hywan 19f5846
fix(cli) Only enable `host-fs`, exclude `mem-fs`.
Hywan 167d926
Merge branch 'master' into js-api-wasi
Hywan 4f59083
fix(vfs) Remove a Clippy error.
Hywan 9d712fd
Fixed Github workflow names
syrusakbary 2cd2b9d
Merge branch 'js-api-wasi' of github.com:wasmerio/wasmer into js-api-…
syrusakbary dac47a8
fix(vfs) Fix `inode_of` on Windows.
Hywan e0a18a3
fix(vfs) Better handle path canonicalization on Windows.
Hywan fd4d341
test(wasi) Install Node v16 for running the tests.
Hywan 18a642d
chore(github) Format workflow.
Hywan d0a95ac
fix(vfs) Fix 4f5908392.
Hywan bb47a47
chore(vfs) Remove Clippy warnings.
Hywan 347f4c6
fix(api) Remove the temporary `Memory::uint8` method.
Hywan 5ae6b98
fix(cli) Simplify a pattern matching.
Hywan eb19c98
Revert "fix(api) Remove the temporary `Memory::uint8` method."
Hywan 2ff9838
doc(api) Document that `Memory::uint8view` is going to be refactored.
Hywan a4525e0
chore(types) Remove commented code.
Hywan 768eb5c
feat(wasi) Update `WasiStateCreationgError::FsError` to `…::FileSyste…
Hywan 650352d
feat(wasi) Clean commented code.
Hywan 87558a9
feat(vfs) `mem-fs` does not support `enable-serde`.
Hywan 4eaa864
doc(wasi) Document that `WasiStateBuilder::build` is changing interna…
Hywan a12ec28
feat(wasi) Provide `WasiState::(un)freeze` if `enable-serde` is enabled.
Hywan c28499e
chore(cargo) Update `Cargo.lock`.
Hywan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: core tests | ||
name: Runtime tests | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ members = [ | |
"lib/engine-dylib", | ||
"lib/engine-staticlib", | ||
"lib/object", | ||
"lib/vfs", | ||
"lib/vm", | ||
"lib/wasi", | ||
"lib/wasi-types", | ||
|
@@ -55,6 +56,7 @@ members = [ | |
"tests/integration/ios", | ||
"fuzz", | ||
] | ||
resolver = "2" | ||
|
||
[build-dependencies] | ||
test-generator = { path = "tests/lib/test-generator" } | ||
|
@@ -72,6 +74,10 @@ wasmer-engine-dummy = { path = "tests/lib/engine-dummy" } | |
compiler-test-derive = { path = "tests/lib/compiler-test-derive" } | ||
tempfile = "3.1" | ||
loupe = "0.1" | ||
# For logging tests using the `RUST_LOG=debug` when testing | ||
test-env-log = { version = "0.2", default-features = false, features = ["trace"] } | ||
tracing = { version = "0.1", default-features = false, features = ["log"] } | ||
tracing-subscriber = { version = "0.2", default-features = false, features = ["env-filter", "fmt"] } | ||
|
||
[features] | ||
# Don't add the compiler features in default, please add them on the Makefile | ||
|
@@ -80,7 +86,6 @@ default = [ | |
"wat", | ||
"wast", | ||
"universal", | ||
"dylib", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why removing |
||
"staticlib", | ||
"cache", | ||
"wasi", | ||
|
@@ -285,4 +290,4 @@ required-features = ["cranelift"] | |
[[example]] | ||
name = "features" | ||
path = "examples/features.rs" | ||
required-features = ["cranelift"] | ||
required-features = ["cranelift"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do we need this? (cf https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2)