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

[Nix] Frontend packaging #10077

Closed
yorickvP opened this issue Jan 24, 2022 · 12 comments · Fixed by #11092
Closed

[Nix] Frontend packaging #10077

yorickvP opened this issue Jan 24, 2022 · 12 comments · Fixed by #11092
Assignees

Comments

@yorickvP
Copy link
Collaborator

yorickvP commented Jan 24, 2022

We have a JS/wasm target in one of the branches that should also be packaged with Nix. Furthermore, we should use buildYarnPackage to build the frontend code.

Branch: https://github.com/MinaProtocol/mina/tree/fix/kimchi-proof-js
build:

dune b src/lib/snarky_js_bindings/snarky_js_node.bc.js
dune b src/lib/snarky_js_bindings/snarky_js_chrome.bc.js
@yorickvP yorickvP self-assigned this Jan 24, 2022
@yorickvP yorickvP added the Tweag label Apr 11, 2022
@yorickvP
Copy link
Collaborator Author

This branch has been merged into develop, it's now possible to work on this.

@yorickvP yorickvP assigned balsoft and unassigned yorickvP Apr 11, 2022
@yorickvP
Copy link
Collaborator Author

yorickvP commented May 4, 2022

Update on this: the work has been rebased to the develop branch, which also contains frontend code: https://github.com/tweag/mina/tree/tweag-cleanup-develop.
I am working on cleaning up the changes necessary for this and pull-requesting them upstream.

@yorickvP
Copy link
Collaborator Author

Update:

  • The js_of_ocaml packages are working, modulo an opam-nix bug concerning LD_LIBRARY_PATH.
  • The wasm packages require some hopefully straightforward work

@yorickvP
Copy link
Collaborator Author

Status update:

  • Work at https://github.com/tweag/mina/commits/yorickvp/nix-rust-wasm
  • The wasm bindings use the cargo -Zbuild-std feature, which doesn't support the cargo vendor setup that we use yet. Github issue comments talk of a workaround, but the link seems to be gone. I'll contact the people involved.
  • I've added an (impure) nix development shell in which the build succeeds.
  • In the meantime, building without -Zbuild-std gets me somewhat further inside nix shell. I'll debug why wasm-pack can't find wasm-bindgen.

@yorickvP
Copy link
Collaborator Author

Back from having covid.

@yorickvP
Copy link
Collaborator Author

  • Fixed the mina_client_sdk_binding pkg output
  • Will now work on packaging frontend/client_sdk and frontend/mina-signer

@yorickvP
Copy link
Collaborator Author

Ran into a nix-npm-buildPackage bug, that I should really fix (current workaround mixes nodejs version), but I did produce a PR containing the packages for the world to look at.

@yorickvP
Copy link
Collaborator Author

Update: nix-npm-buildPackage is not compatible with npm lockfile v2, adding this compatibility should be easy.

@yorickvP
Copy link
Collaborator Author

Produced serokell/nix-npm-buildpackage#44

@yorickvP
Copy link
Collaborator Author

Todo tomorrow: re-rebase

@yorickvP
Copy link
Collaborator Author

yorickvP commented Jun 2, 2022

Update:

@yorickvP
Copy link
Collaborator Author

yorickvP commented Jun 3, 2022

I've split off some trivial changes that were pulling in a lot of reviewers:

This should cut down the reviewers to just protocol-eng.

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 a pull request may close this issue.

2 participants