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

Automate release & Precompiled binary #87

Closed
2 tasks done
kdy1 opened this issue Dec 22, 2018 · 13 comments
Closed
2 tasks done

Automate release & Precompiled binary #87

kdy1 opened this issue Dec 22, 2018 · 13 comments

Comments

@kdy1
Copy link
Member

kdy1 commented Dec 22, 2018

Binary (index.node) should be built on ci and package's install script should download proper built dylib from github releases.

TODOs

@kdy1 kdy1 added this to the v1.0.0 - babel milestone Dec 22, 2018
@kdy1 kdy1 changed the title Automate release Automate release & Precompiled binary Dec 22, 2018
@marvinhagemeister
Copy link
Contributor

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.

@rauchg
Copy link

rauchg commented Dec 23, 2018

@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 postinstall platform / OS specific binary acquisition.

Users could also set up an ENV variable (like puppeteer supports) to skip postinstall if desired (for performance or maybe security reasons)

@amilajack
Copy link

@kdy1 I'm a core member of the @neon-bindings team. We're looking to support cross compilation in the upcoming months

@kdy1
Copy link
Member Author

kdy1 commented Dec 26, 2018

Wasm seems like a good idea.

But to compile into wasm, we need to drop rustc-ap dependencies.

@dennythecoder dennythecoder mentioned this issue Dec 30, 2018
@kdy1 kdy1 closed this as completed Jan 30, 2019
@motss
Copy link

motss commented Apr 18, 2019

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.

@kdy1
Copy link
Member Author

kdy1 commented Apr 18, 2019

@motss Normally you don't have to install rust to use swc.
Precompiled binary exists for both mac and windows.

We may use wasm in future to support all platforms, but it would require lots of work on error handling logic.

@motss
Copy link

motss commented Apr 18, 2019

@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.

@anurbol
Copy link
Contributor

anurbol commented Dec 8, 2019

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?

@amilajack
Copy link

amilajack commented Dec 8, 2019

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.

See:
neon-bindings/neon#440
neon-bindings/neon#458

@anurbol
Copy link
Contributor

anurbol commented Dec 8, 2019

@amilajack And that's truly great! I am still curious about current WASM status though.

@kdy1
Copy link
Member Author

kdy1 commented Dec 8, 2019

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?

I dropped rustc-ap dependencies, and I think compiling swc to wasm would require just adding a few cfgs

@anurbol
Copy link
Contributor

anurbol commented Dec 9, 2019

@kdy1 Because wasm is not what this issue is about, I continued here

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 29, 2022

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.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants
@rauchg @marvinhagemeister @anurbol @amilajack @motss @kdy1 @swc-bot and others