Skip to content

feat: migrate back to prost#6363

Merged
jxs merged 26 commits into
libp2p:masterfrom
macladson:prost
May 27, 2026
Merged

feat: migrate back to prost#6363
jxs merged 26 commits into
libp2p:masterfrom
macladson:prost

Conversation

@jxs
Copy link
Copy Markdown
Member

@jxs jxs commented Apr 2, 2026

Description

In #3312, we migrated from prost to quick-protobuf primarily to eliminate the need for the protoc dependency on CI for generating Rust code from .proto files, as we were not versioning them at the time.

However, quick-protobuf has been unmaintained for years, and we should transition to a more actively maintained protobuf implementation. By versioning the generated Rust code from the .proto files, we can limit the need for protoc to only when the .proto files are modified and the Rust code needs to be regenerated.

To address this, @macladson has generously taken the time to draft a migration plan to move us back to prost.

@jxs jxs marked this pull request as draft April 2, 2026 14:51
@jxs jxs changed the title chore: migrate back to prost feat: migrate back to prost Apr 2, 2026
@romac
Copy link
Copy Markdown

romac commented Apr 28, 2026

Note that there exists a pure Rust Protobuf compiler as a library for use with prost-build, in case you'd rather not version the generated Rust code (or just eschew the protoc dependency altogether): https://lib.rs/crates/protox

Not my crate but been using it for a while and it's worked great so far.

@jxs jxs added internal-change Pull requests that make internal changes to crates and thus don't need to include a changelog entry. labels May 8, 2026
@jxs jxs marked this pull request as ready for review May 8, 2026 16:26
Comment thread misc/gen-proto/src/main.rs
Comment thread misc/prost-codec/Cargo.toml
@jxs jxs force-pushed the prost branch 3 times, most recently from e1e50d7 to 6a26cbc Compare May 8, 2026 23:13
Comment thread core/CHANGELOG.md Outdated
@jxs jxs force-pushed the prost branch 2 times, most recently from 716cc29 to 5595a2d Compare May 8, 2026 23:22
@jxs jxs requested a review from elenaf9 May 8, 2026 23:30
@jxs
Copy link
Copy Markdown
Member Author

jxs commented May 8, 2026

Note that there exists a pure Rust Protobuf compiler as a library for use with prost-build, in case you'd rather not version the generated Rust code (or just eschew the protoc dependency altogether): https://lib.rs/crates/protox

Not my crate but been using it for a while and it's worked great so far.

thanks! adapted gen-proto to use protox and with that we don't need to introduce protoc in the ci nor require people to have it installed and this becomes a very seamless transition

Comment thread protocols/relay/src/protocol/outbound_hop.rs
Comment thread protocols/rendezvous/src/codec.rs
Comment thread misc/webrtc-utils/src/stream.rs
Comment thread protocols/autonat/src/v1/protocol.rs Outdated
Comment thread transports/noise/src/io/framed.rs
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 18, 2026

This pull request has merge conflicts. Could you please resolve them @jxs? 🙏

Copy link
Copy Markdown
Member

@elenaf9 elenaf9 left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread protocols/relay/src/protocol/outbound_hop.rs
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 22, 2026

This pull request has merge conflicts. Could you please resolve them @jxs? 🙏

@jxs jxs added the send-it label May 27, 2026
@jxs jxs merged commit 817ed75 into libp2p:master May 27, 2026
68 of 70 checks passed
@macladson macladson deleted the prost branch May 27, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal-change Pull requests that make internal changes to crates and thus don't need to include a changelog entry. send-it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants