chore: prepare barretenberg-rs for crates.io publishing#20496
Open
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
Open
chore: prepare barretenberg-rs for crates.io publishing#20496johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
Conversation
Collaborator
|
I'm opposed to this. this is how people get messy PR diffs and end up having to ask if they're messing something up |
Add `include` to Cargo.toml so that the generated api.rs and generated_types.rs are included in the published crate package even though they remain gitignored. This way the crate is self-contained on crates.io without committing generated files to the repo. Also add `publish = false` to the tests crate.
b00d10e to
e2ffe4a
Compare
Manual workflow_dispatch that downloads the bb binary from a GitHub release, generates the Rust bindings, sets the crate version, and publishes to crates.io.
Contributor
Author
Undone the committing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
includefield to barretenberg-rsCargo.tomlso generatedapi.rsandgenerated_types.rsare included in the published crate, even though they remain gitignoredpublish = falseto the tests crateBackground
The generated files are created by
yarn generateints/from the C++ msgpack schema. They're gitignored since they're build artifacts. However,cargo publishrespects.gitignoreby default, which means the published crate would be missing these files.The
includefield overrides.gitignorefor packaging — as long as the files exist on disk whencargo publishruns, they'll be included. The publish workflow just needs to runyarn generatefirst.