Skip to content
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(core): experimental wasi target #22679

Closed
wants to merge 2 commits into from
Closed

feat(core): experimental wasi target #22679

wants to merge 2 commits into from

Conversation

FrozenPandaz
Copy link
Collaborator

@FrozenPandaz FrozenPandaz commented Apr 4, 2024

Originally opened by @Brooooooklyn

This pull request is trying to add wasm32-wasi target support for the nx/native

To test the build, you can run the following commands:

  • pnpm exec napi build --release --platform -c packages/nx/package.json --manifest-path packages/nx/Cargo.toml --js ./index.js -o packages/nx/src/native --target wasm32-wasi-preview1-threads

And the wasm file will be built at packages/nx/src/native/nx.wasm32-wasi.wasm

Blocked by:

The pseudo_terminal mod is excluded on the wasm32 targets, which is as expected.

The watch mod is excluded because of the upstream gix-* deps introduce by ignore-files don't support wasi target at this moment (but we can improve it).

Copy link

vercel bot commented Apr 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ❌ Failed (Inspect) Apr 4, 2024 8:37pm

if (localFileExisted) {
nativeBinding = require('./nx.android-arm-eabi.node')
} else {
nativeBinding = require('@nx/nx-android-arm-eabi')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These imports have been broken some how.

The prefix is specified in package.json here:

"name": "@nx/nx"
but is not being picked up by napi for some reason. Could you take a look please? 👀 I imagine it's a result of upgrading Napi to the 3.0.0 version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Brooooooklyn Do you know what might be going on here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look tomorrow 🥹

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrozenPandaz it should be napi.packageName now

@FrozenPandaz
Copy link
Collaborator Author

Closing in favor of #22870

@FrozenPandaz FrozenPandaz deleted the wasm branch May 7, 2024 21:36
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants