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

Reproducible Build #251

Closed
5 of 6 tasks
hackaugusto opened this issue Feb 27, 2024 · 6 comments · Fixed by #267
Closed
5 of 6 tasks

Reproducible Build #251

hackaugusto opened this issue Feb 27, 2024 · 6 comments · Fixed by #267
Assignees

Comments

@hackaugusto
Copy link
Contributor

hackaugusto commented Feb 27, 2024

  • use cargo make
  • add Cargo.lock to repo
  • add rust-toolchain.toml
  • update ci to use cargo make rules
  • update CONTRIBUTING.md to mention cargo make
  • update pre-commmit.yaml to use cargo make

ref: 0xPolygonMiden/miden-vm#1259

@hackaugusto
Copy link
Contributor Author

related: #238

@phklive
Copy link
Contributor

phklive commented Mar 6, 2024

@hackaugusto could you give me more information on what we would need to add to the rust-toolchain.toml?

@hackaugusto
Copy link
Contributor Author

hackaugusto commented Mar 6, 2024

Ofcourse. The rust-toolchain.toml allows us to define the compiler version we are testing/building with. The goal is for every build to use the same compiler version, including your local builds and the CI, this will remove changes due to version differences.

In our case we want to define the following:

  • A stable version of the compiler. Which should match the minimum rust-version used for all crates in the repo. This will test the minimum supported rust version (MSRV)
    • In some cases this will also need the wasm32 target, for the crates that we support no-std.
  • A nightly version of the compiler. This is mostly used because of cargo fmt, because we use nightly format features

@phklive
Copy link
Contributor

phklive commented Mar 11, 2024

After doing some research and testing I have not found a way to set both the stable and nightly versions in a rust-toolchain.toml file.

I propose the following solution, we use the toolchain file to set the stable version for all crates of the node and use cargo make setting the right flags to run fmt and clippy using nightly.

It works well.

@phklive
Copy link
Contributor

phklive commented Mar 11, 2024

@hackaugusto we do not have a pre-commit.yaml file in the miden-node for now right? Should we add one?

@hackaugusto
Copy link
Contributor Author

@hackaugusto we do not have a pre-commit.yaml file in the miden-node for now right? Should we add one?

Go ahead :)

@phklive phklive moved this to In Progress in Builder's testnet Mar 11, 2024
@phklive phklive self-assigned this Mar 11, 2024
@Dominik1999 Dominik1999 moved this from Todo to Done in Builder's testnet Mar 11, 2024
@Dominik1999 Dominik1999 moved this from Done to Todo in Builder's testnet Mar 11, 2024
@Dominik1999 Dominik1999 moved this from Todo to In Progress in Builder's testnet Mar 11, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Builder's testnet Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants