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: add binaryen to package.json to get local wasm-opt binary #43

Closed
wants to merge 3 commits into from

Conversation

willemneal
Copy link
Member

Missing in the README was the dependency of binaryen, this uses the npm release to get a local binary in ./node_modules/.bin

package.json Outdated
@@ -8,7 +8,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"wasm-opt": "wasm-opt"
Copy link
Member

Choose a reason for hiding this comment

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

I notice that the script is added here, but the Makefile doesn't use the script. Is it supposed to use the script? Or is this unused?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops yeah, I had attempted to invoke the script with npm run wasm-opt -- ..., but it failed so I directly referenced the javascript file. Also is it a good idea to ditch the Makefile since this uses npm scripts to bulid anyway?

Copy link
Member

Choose a reason for hiding this comment

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

You can probably directly reference the file here in the script.

@paulbellamy I defer to you regarding the Makefile. Might be strange to trigger cargo builds from npm, but also given the audience as primarily front-end development, maybe not.

Copy link
Contributor

Choose a reason for hiding this comment

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

The intended distinction was Makefiles for rust, and npm for js. But we should either make that clear, or standardize into npm (gulp for building rust?). Either way this is an improvement, so let's merge, and work on that in: #49

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably add a note to the README.md, to tell the user to npm install before running ./initialize.sh, so that wasm-opt is installed. @willemneal would you like to do that? or should I?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add it to this PR.

@leighmcculloch leighmcculloch mentioned this pull request Oct 19, 2022
@willemneal
Copy link
Member Author

@leighmcculloch Just removed the unused script, tried again and npm run didn't work.

@paulbellamy Added a note to the readme about needing to run npm install.

@paulbellamy
Copy link
Contributor

@willemneal do we still need this, given stellar/stellar-cli#236?

@willemneal
Copy link
Member Author

@willemneal do we still need this, given stellar/soroban-tools#236?

Yep!

@willemneal willemneal closed this Nov 28, 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

Successfully merging this pull request may close these issues.

None yet

3 participants