-
Notifications
You must be signed in to change notification settings - Fork 201
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
feat: isomorphic wasi #1571
Merged
Merged
feat: isomorphic wasi #1571
Conversation
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
Chriscbr
approved these changes
Feb 17, 2023
Chriscbr
approved these changes
Feb 17, 2023
Co-authored-by: Chris Rybicki <[email protected]>
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Congrats! 🚀 This was released in Wing 0.5.52. |
eladb
reviewed
Feb 19, 2023
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.
Goodness!
MarkMcCulloh
added a commit
that referenced
this pull request
Feb 19, 2023
This reverts commit b0e799f.
mergify bot
pushed a commit
that referenced
this pull request
Feb 19, 2023
The changes in #1571 introduced wasi-js, which has a troublesome preinstall script. Until a fix is found to either get rid of it or make it work for everyone, this reverts all the wasi changes *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
mergify bot
pushed a commit
that referenced
this pull request
Feb 20, 2023
This PR reintroduces #1571 with 3 additional changes to avoid [the last regression](#1578): - `patch-package` is used to mess with wasi-js, to remove the preinstall script from their package.json. The patching is performed during packaging, where it's actually effective (for downstream consumers). - wasi-js is included as a bundled dep for winglang to ensure that the patched `package.json` is appropriately patched in time to avoid any hooks. Normally this isn't needed with patch package, but due to the particular mutation I'm not sure this is avoidable - Added checks to hangar to ensure we avoid introducing script hooks. I verified that these tests pass with the latest version of the repo but fail the version noted in the regression. The changes from the original PR are untouched. *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Current State
wingc is currently consumed in two ways:
wasi
modulesThis is ok, but there are several downsides:
wasi
only works in nodewasi
required node18 or newer and more importantly requires the use of an experimental flagNew Change
I noticed that bun recently started using wasi-js for wasi. This library is a better-maintained fork of wasmer-js. It's part of https://cowasm.org/ which is a super cool project.
So I switched the CLI to use this library to load wingc, and made the playground consume the cli as a library.
TODO
By submitting this pull request, I confirm that my contribution is made under the terms of the Monada Contribution License.