-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add experimental @tailwindcss/oxide-wasm32-wasi
#17558
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
Conversation
d377cc8 to
b9b3e6b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
da756d2 to
3f29edb
Compare
@tailwindcss/oxide-wasm@tailwindcss/oxide-wasm32-wasi
3f29edb to
6eedd0a
Compare
bf66895 to
478ce9e
Compare
478ce9e to
9239a0b
Compare
32447e6 to
387aef3
Compare
601e3fa to
3160eb4
Compare
3160eb4 to
4cf1fc7
Compare
@tailwindcss/oxide-wasm32-wasi@tailwindcss/oxide-wasm32-wasi
thecrypticace
left a comment
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.
this looks good to me. Would be good to have @RobinMalfait look at the CI workflow changes
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ./target/ |
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.
Remove these since 1) they are not part of the hash and 2) are already cached in the cache-cargo action before this one.
RobinMalfait
left a comment
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.
Nothing obvious that stands out. All the newly added files all exist on disk so I think it's a publish and see situation.
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Closes #13133
This PR adds an a new Oxide target for
wasm32-wasip1-threads:@tailwindcss/oxide-wasm32-wasi. The goal of this is to enable more environments to run Oxide, including (but not limited to) StackBlitz.We're making use of
napi-rs's upcoming v3 features to simplify the setup here, meaningnapi-rswill configure the WASM target and create an npm package that works across Node and browser environments.MacOS AArch64 issues
While setting up an integration test for the new WASM target, I ran into an issue where FS reads where not terminating on macOS. After some research I found this to be a limitation of the Node.js container interface right now, see: nodejs/node#47193
Windows issues
We also found that the Node.js wasi container does not properly support Windows: nodejs/uvwasi#11
For now we, it's probably best for MacOS AArch64 users and Windows users to use the native modules instead.
Test plan
The
@tailwindcss/oxide-wasm32-wasinpm package can be built locally viapnpm buildand then run with the Oxide API. A usage example can be taken from the newly added integration test.Furthermore this was tested to work as a polyfill on StackBlitz: https://stackblitz.com/edit/vitejs-vite-uks3gt5p
[ci-all]