protocolbuffers / protocolbuffers/protobuf
Rust: automatically source the matching protoc-prebuilt in build.rs (at least opt-in behavior).
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
Hi,
the version-check in the rust protobuf_codegen crate seams very strict (Equality).
The static assertion inserted into the generated code seams more reasonable:
https://github.com/protocolbuffers/protobuf/blob/f37611ef2ebae84cbbc337899bfa6c7c253dac56/rust/internal.rs#L94
The strict version check enforces a tight coupling between the versions used inside the crate, and the version of protoc on the system.
maybe also provide a way to automaticaly download the right protoc version. for example using the protoc-prebuilt crate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the version check in rust/release_crates/protobuf_codegen/src/lib.rs and the generated-code assertion in rust/internal.rs, then inspect the crate's build.rs. Compare the current coupling behavior with the proposed protoc-prebuilt approach and define the opt-in behavior, including how a matching protoc version would be selected and downloaded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100