Skip to content

chore: prepare barretenberg-rs for crates.io publishing#20496

Open
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
jh/commit-generated-rust-files
Open

chore: prepare barretenberg-rs for crates.io publishing#20496
johnathan79717 wants to merge 2 commits intomerge-train/barretenbergfrom
jh/commit-generated-rust-files

Conversation

@johnathan79717
Copy link
Contributor

@johnathan79717 johnathan79717 commented Feb 13, 2026

Summary

  • Add include field to barretenberg-rs Cargo.toml so generated api.rs and generated_types.rs are included in the published crate, even though they remain gitignored
  • Add publish = false to the tests crate

Background

The generated files are created by yarn generate in ts/ from the C++ msgpack schema. They're gitignored since they're build artifacts. However, cargo publish respects .gitignore by default, which means the published crate would be missing these files.

The include field overrides .gitignore for packaging — as long as the files exist on disk when cargo publish runs, they'll be included. The publish workflow just needs to run yarn generate first.

@ludamad
Copy link
Collaborator

ludamad commented Feb 13, 2026

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.
@johnathan79717 johnathan79717 force-pushed the jh/commit-generated-rust-files branch from b00d10e to e2ffe4a Compare February 13, 2026 17:21
@johnathan79717 johnathan79717 changed the title chore: commit generated Rust files for barretenberg-rs publishing chore: prepare barretenberg-rs for crates.io publishing Feb 13, 2026
@johnathan79717 johnathan79717 marked this pull request as draft February 13, 2026 17:22
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.
@johnathan79717
Copy link
Contributor Author

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

Undone the committing.

@johnathan79717 johnathan79717 marked this pull request as ready for review February 13, 2026 17:47
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.

2 participants