-
Notifications
You must be signed in to change notification settings - Fork 51
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
garaga_rs WASM bindings #180
garaga_rs WASM bindings #180
Conversation
I have marked it for review but there are 2 steps that we could still include in the PR: 1- Commit tools/garaga_rs/pkg folder with the code generated by the wasm-pack-build-and-patch script (except .wasm files which are large), this can help detecting unexpected changes on the wasm-pack output that could mess the patched configuration 2- Include a folder with a minimal project that imports the garaga_rs npm package as an end-to-end test |
and i run it with How can we make a separate test folder with this file that imports it and runs this file as well in the CI ? More generally how can set up the config so that the pkg/ folder built from the script has an automated part that is generated by wasm-pack, and a more high level part with wrappers that we don't delete each time the wasm-pack-build-and-patch is ran ? The idea is that the bindings can be regenerated but the high level functions that uses the binding don't change and are part of the same package |
Yes, we can redirect the output to any folder using
Ideally we would setup a minimal/complete typescript project that imports garaga_rs. In fact we could use your code above but have a small set of config variations in subfolders (to test compatibility e.g. commonjs vs esm, browser vs nodejs, javascript vs typescript) and setup an umbrella project (monorepo style) that compiles and tests them altogether to be used on CI. We could have a structure like tools/npm/pkg or better tools/npm/garaga_rs
I think you are talking about a hybrid package that has both WASM module and additional TypeScript, like we have for Pyhton, right? In that case I would do just like ed25519.wasm and setup a full NPM project that is built with rollup.js and integrates both parts. Right now, I have simplified that setup under the assumption that the NPM package would only include the WASM code. In that case we could have borrow of structure ed25519.wasm like tools/npm/garaga_rs/src/node/ where tools/npm/garaga_rs would be the root of the NPM package built with rollup.js |
…into rust-wasm-binding
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information