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

[develop] Add mina as a git submodule for o1js #1318

Merged
merged 24 commits into from
Dec 19, 2023

Conversation

MartinMinkov
Copy link
Contributor

@MartinMinkov MartinMinkov commented Dec 13, 2023

Description

Addresses #1096

🔗 Mina: MinaProtocol/mina#14649
🔗 o1js-bindings: o1-labs/o1js-bindings#222

This PR aims to add mina as a submodule of o1js and add support to build everything in the top level directory. To do so, the following changes were made:

  1. Add mina as a submodule, located under src/mina, and target the PR above
  2. Update the bindings submodule to the PR above
  3. Add details to README-dev.md to elaborate on how to build the bindings and give contextual information
  4. Some auxiliary updates, like updating package-lock.json, modifying some config files, etc.
  5. Add a top-level dune-project file to let dune build all OCaml dependencies in the current root context.

MartinMinkov and others added 21 commits December 13, 2023 10:53
…prevent Jest from running tests in this directory
…t tests

This change is temporary until 'snarkyjs' is removed from the mina repo.
…om jest tests

This change was made because the 'snarkyjs' inside the mina repo has been removed, making the condition unnecessary.
…n and README-dev.md for better clarity and consistency
…directory structure, ensuring correct files are ignored by Prettier
…build scripts

- Replace opam with Dune in the list of required tools to reflect changes in the build process
- Add a new section about build scripts, explaining the role of update-snarkyjs-bindings.sh
- Expand on the OCaml bindings section, detailing the use of Dune and Js_of_ocaml in the build process
- Add information about the WebAssembly bindings build process, including the output files
- Introduce a section about generated constant types, explaining how they are created and their role in ensuring protocol consistency
Co-authored-by: Gregor Mitscha-Baude <gregor.mitscha-baude@gmx.at>
Co-authored-by: Gregor Mitscha-Baude <gregor.mitscha-baude@gmx.at>
Co-authored-by: Gregor Mitscha-Baude <gregor.mitscha-baude@gmx.at>
…lity and maintainability

feat(package.json): add new build commands for bindings, update-bindings, and wasm
chore(src/bindings): update subproject commit hash for latest changes
…cript commands for better readability and maintainability
@MartinMinkov MartinMinkov changed the title [main] Add mina as a git submodule for o1js [develop] Add mina as a git submodule for o1js Dec 13, 2023
MartinMinkov and others added 3 commits December 14, 2023 10:34
Co-authored-by: Gregor Mitscha-Baude <gregor.mitscha-baude@gmx.at>
Copy link
Member

@Trivo25 Trivo25 left a comment

Choose a reason for hiding this comment

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

Great job, really love the dev readme improvements!!!


If you need to regenerate the OCaml and WebAssembly artifacts, you can do so within the o1js repo. The [bindings](https://github.com/o1-labs/o1js-bindings) and [Mina](https://github.com/MinaProtocol/mina) repos are both submodules of o1js, so you can build them from within the o1js repo.

o1js depends on OCaml code that is transpiled to JavaScript using [Js_of_ocaml](https://github.com/ocsigen/js_of_ocaml), and Rust code that is transpiled to WebAssembly using [wasm-pack](https://github.com/rustwasm/wasm-pack). These artifacts allow o1js to call into [Pickles](https://github.com/o1-labs/snarkyhttps://github.com/MinaProtocol/mina/blob/develop/src/lib/pickles/README.md), [snarky](https://github.com/o1-labs/snarky), and [Kimchi](https://github.com/o1-labs/proof-systems) to write zk-SNARKs and zkApps.
Copy link
Member

Choose a reason for hiding this comment

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

broken link to Pickles

@MartinMinkov MartinMinkov merged commit fd9c2ab into develop Dec 19, 2023
13 checks passed
@MartinMinkov MartinMinkov deleted the feat/add-mina-submodule-develop branch December 19, 2023 16:54
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.

3 participants