-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Automate release & Precompiled binary #87
Comments
Perhaps it may be worth to look into WebAssembly. Node natively does support it and it seems like a great use case for cross-platform binaries. It would make the CI setup much simpler rather than having to set up pipelines for each OS. |
@marvinhagemeister the CI set up is a one-time cost that could save a lot of time in aggregate if the module becomes popular. Perhaps another option would be: make the fallback wasm, do a best-effort Users could also set up an ENV variable (like puppeteer supports) to skip postinstall if desired (for performance or maybe security reasons) |
@kdy1 I'm a core member of the @neon-bindings team. We're looking to support cross compilation in the upcoming months |
Wasm seems like a good idea. But to compile into wasm, we need to drop rustc-ap dependencies. |
Does this worth a look in the future as shipping compiled binary in WASM would make it easier for users to just install the package directly from NPM without installing Rust on their system as well as on CI? I'm saying this because installing Rust on Windows is not as straightforward as on other OS such as macOS. |
@motss Normally you don't have to install rust to use swc. We may use wasm in future to support all platforms, but it would require lots of work on error handling logic. |
@kdy1 Forgive me if I read the docs incorrectly. From the docs, it says that Rust is needed and I haven't tried it because of that. I'll try it then and see. Thanks for the clarification. |
I didn't try yet building SWC on WASM, but I think it won't work yet. However I severely wish it would work. @kdy1 those rustc-ap packages are crucial and inevitable, aren't they? They also won't allow SWC to build for WASM? |
The Neon team is working on adding support for N-API which will allow SWC to distribute a precompiled binary that will work on all platforms. |
@amilajack And that's truly great! I am still curious about current WASM status though. |
I dropped rustc-ap dependencies, and I think compiling swc to wasm would require just adding a few |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Binary (index.node) should be built on ci and package's install script should download proper built dylib from github releases.
TODOs
Build index.node from ci
Note: neon does not support cross compilation
install script to download proper binary
The text was updated successfully, but these errors were encountered: