-
Notifications
You must be signed in to change notification settings - Fork 836
Open
Labels
Description
Currently binaryen.js provides a JS API. Maybe we could also make a commandline version, basically a port of wasm-opt so it runs in node.js. Using NODERAWFS it can have filesystem access, and using node pthreads it even should be almost as fast.
I'm imagining something like
$ npm install -g binaryen
$ wasm-opt input.wasm -O -o output.wasm
This might help with distributing builds. See e.g. #2405 (comment) for issues with getting a single native build to run on all linuxes etc. - with a node.js build we should be easily portable to anywhere node.js runs + more secure! :)
cc @dcodeIO