-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: publish WASM web package #224
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.
Yeah cool, LGTM
@@ -39,7 +39,7 @@ jobs: | |||
- name: Build WASM | |||
run: | | |||
cd yggdrasilwasm | |||
wasm-pack build --target nodejs | |||
wasm-pack build --target web |
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.
Any idea what this works for? That looks pure browser based but node is definitely a thing we need
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 guess we'll find out in practice.
From https://rustwasm.github.io/docs/wasm-pack/commands/build.html
Outputs JS that can be natively imported as an ES module in a browser, but the WebAssembly must be manually instantiated and loaded.
You can read about the different targets here: https://rustwasm.github.io/docs/wasm-bindgen/reference/deployment.html
I believe it should work for both browsers and Node-like runtimes, as long as we don't do browser-specific things in our WASM, which I'm pretty sure we won't.
It already works in our Bun e2e tests, which don't run on a browser environment.
Co-authored-by: Simon Hornby <[email protected]>
https://linear.app/unleash/issue/2-3335/create-a-publish-workflow-for-our-wasm-package
Adds the publish WASM workflow and cleans up a few things.
I wonder if we can get away with reusing our npm-release workflow. Is there a better way to test this than to just merge it and trying to publish a release?