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

npm packaging of wasm2c #1438

Closed
kripken opened this issue May 21, 2020 · 6 comments
Closed

npm packaging of wasm2c #1438

kripken opened this issue May 21, 2020 · 6 comments

Comments

@kripken
Copy link
Member

kripken commented May 21, 2020

As mentioned in #1436 I need an npm package for wasm2c (basically I want to use it from emscripten, and an emscripten build is the easiest and best way to get one!)

I created a quick one now: https://www.npmjs.com/package/wasm2c it basically has my build and the wasm2c runtime sources.

cc @dcodeIO @binji - thoughts? This could also be part of the main wabt package on npm I guess. I don't feel strongly either way, but it was super-easy to do it this way, and the more I think about it, it seems nice to have a package for wasm2c specifically.

@dcodeIO
Copy link
Contributor

dcodeIO commented May 21, 2020

The buildbot publishing wabt.js to npm reuses the build step provided by the main package so far, pretty much identical in nature to what's done for binaryen.js. Theoretically it can build all the relevant binaries and automatically publish them either as one or as multiple npm packages, depending on what we figure is best :)

@syrusakbary
Copy link

Note: it might be interesting to ship as well wasm-decompile:

wasmerio/vscode-wasm#24

@kripken
Copy link
Member Author

kripken commented May 26, 2020

Oh ok good, then sounds like it should already package up all the tools? The one missing thing for wasm2c then would be we also need the wasm2c runtime sources (.h, .c in wasm2c/) to be in the build.

@binji
Copy link
Member

binji commented May 26, 2020

I don't have a strong opinion here. I'd probably say keep the tools together, but I don't know if that's inconvenient for users.

@dcodeIO
Copy link
Contributor

dcodeIO commented May 26, 2020

Gave this a try and found that all tools, incl. the lib, together are 9.22mb of JS. Seems fine to me considering that the package has no dependencies otherwise.

@keithw
Copy link
Member

keithw commented May 19, 2022

Closing as this discussion seems to have converged.

@keithw keithw closed this as completed May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants