Skip to content

Commit 4d5c582

Browse files
committed
Merge remote-tracking branch 'upstream/master' into patch-stack
2 parents 9e9818e + 330b786 commit 4d5c582

File tree

51 files changed

+506
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+506
-329
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
toolchain: stable
2121
override: true
2222
- name: Cache protobuf
23-
uses: actions/cache@v2
23+
uses: actions/cache@v4
2424
with:
2525
key: pb-linux-3.19.4
2626
path: ~/pb
@@ -65,7 +65,7 @@ jobs:
6565
toolchain: beta
6666
override: true
6767
- name: Cache protobuf
68-
uses: actions/cache@v2
68+
uses: actions/cache@v4
6969
with:
7070
key: pb-linux-3.19.4
7171
path: ~/pb
@@ -110,7 +110,7 @@ jobs:
110110
toolchain: stable
111111
override: true
112112
- name: Cache protobuf
113-
uses: actions/cache@v2
113+
uses: actions/cache@v4
114114
with:
115115
key: pb-linux-3.19.4
116116
path: ~/pb
@@ -152,7 +152,7 @@ jobs:
152152
toolchain: nightly
153153
override: true
154154
- name: Cache protobuf
155-
uses: actions/cache@v2
155+
uses: actions/cache@v4
156156
with:
157157
key: pb-linux-3.19.4
158158
path: ~/pb
@@ -196,7 +196,7 @@ jobs:
196196
toolchain: stable
197197
override: true
198198
- name: Cache protobuf
199-
uses: actions/cache@v2
199+
uses: actions/cache@v4
200200
with:
201201
key: pb-windows-3.19.4
202202
path: ~/pb
@@ -267,7 +267,7 @@ jobs:
267267
- name: Checkout sources
268268
uses: actions/checkout@v2
269269
- name: Cache protobuf
270-
uses: actions/cache@v2
270+
uses: actions/cache@v4
271271
with:
272272
key: pb-linux-3.19.4
273273
path: ~/pb

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ src/test/v*/pb_*.rs
1111
src/test/v*/*_pb.rs
1212
src/test/lib
1313
protobuf-bin-gen-rust
14-
protoc-gen-rust
14+
protoc-gen-rs
1515
target/
1616
Cargo.lock
1717
.idea

CHANGELOG.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
# Changelog
22

3-
## [3.6] - Unreleased
3+
## Unreleased
44

5-
## [3.5.1] - Unreleased
5+
## [3.7.2] - 2025-03-10 (to be released)
6+
7+
- [Do not stack overflow on groups](https://github.com/stepancheg/rust-protobuf/pull/756)
8+
9+
## [3.7.1] - 2024-11-15
10+
11+
- `protoc-gen-rust` renamed to `protoc-gen-rs`. `protoc --rust_out=` no longer works with latest Google protobuf,
12+
they are working on official protobuf support for Rust.
13+
- Do not detect nightly in `protobuf` crate (no longer needed)
14+
- [Repeated fields in constants](https://github.com/stepancheg/rust-protobuf/pull/740)
15+
16+
## [3.6.0] - 2024-09-30
17+
18+
- [Fix text format parsing of non-ASCII](https://github.com/stepancheg/rust-protobuf/pull/730)
19+
20+
## [3.5.1] - 2024-08-19
621

722
- [Remove deprecated `box_pointers` lint](https://github.com/stepancheg/rust-protobuf/pull/733)
823

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ members = [
2424
"test-crates/protobuf-test",
2525
"test-crates/protobuf-test-common",
2626
]
27+
28+
[workspace.dependencies]
29+
protoc-bin-vendored = "=3.1.0"

ci-gen/src/actions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn cargo_doc(name: &str, args: &str) -> Step {
9292
pub fn cache(name: &str, key: &str, path: &str) -> Step {
9393
Step::uses_env_with(
9494
name,
95-
"actions/cache@v2",
95+
"actions/cache@v4",
9696
&[("cache-name", "pb")],
9797
Yaml::map(vec![("key", key), ("path", path)]),
9898
)

protobuf-codegen/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = "https://github.com/stepancheg/rust-protobuf/"
99
description = """
1010
Code generator for rust-protobuf.
1111
12-
Includes a library to invoke programmatically (e. g. from `build.rs`) and `protoc-gen-rust` binary.
12+
Includes a library to invoke programmatically (e. g. from `build.rs`) and `protoc-gen-rs` binary.
1313
"""
1414

1515
[lib]
@@ -27,8 +27,8 @@ protobuf-parse = { path = "../protobuf-parse", version = "=4.0.0-alpha.0" }
2727

2828
[[bin]]
2929

30-
name = "protoc-gen-rust"
31-
path = "src/bin/protoc-gen-rust.rs"
30+
name = "protoc-gen-rs"
31+
path = "src/bin/protoc-gen-rs.rs"
3232
test = false
3333

3434
[package.metadata.docs.rs]

protobuf-codegen/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ This crate is useful mostly from `build.rs` scripts to generate `.rs` files duri
77
# How to generate code
88

99
There are three main ways to generate `.rs` files from `.proto` files:
10-
* using `protoc` command line tool and `protoc-gen-rust` plugin
10+
* using `protoc` command line tool and `protoc-gen-rs` plugin
1111
* using this crate `Codegen` with pure rust parser
1212
* using this crate `Codegen` with `protoc` parser
1313

1414
Which one should you use depends on your needs.
1515

1616
If you are using non-cargo build system (like Bazel), you might prefer
17-
using `protoc-gen-rust` plugin for `protoc`.
17+
using `protoc-gen-rs` plugin for `protoc`.
1818

1919
If you build with `cargo`, you probably want to use `Codegen` from this crate.
2020

@@ -54,12 +54,12 @@ protobuf_codegen::Codegen::new()
5454
.run_from_script();
5555
```
5656

57-
## How to use `protoc-gen-rust`
57+
## How to use `protoc-gen-rs`
5858

5959
If you have to.
6060

6161
(Note `protoc` can be invoked programmatically with
62-
[protoc crate](https://docs.rs/protoc/%3E=3.0.0-alpha))
62+
[protoc crate](https://docs.rs/protoc/))
6363

6464
0) Install protobuf for `protoc` binary.
6565

@@ -78,11 +78,11 @@ apt-get install protobuf-compiler
7878
Protobuf is needed only for code generation, `rust-protobuf` runtime
7979
does not use C++ protobuf library.
8080

81-
1) Install `protoc-gen-rust` program (which is `protoc` plugin)
81+
1) Install `protoc-gen-rs` program (which is `protoc` plugin)
8282

8383
It can be installed either from source or with `cargo install protobuf-codegen` command.
8484

85-
2) Add `protoc-gen-rust` to $PATH
85+
2) Add `protoc-gen-rs` to $PATH
8686

8787
If you installed it with cargo, it should be
8888

@@ -93,7 +93,7 @@ PATH="$HOME/.cargo/bin:$PATH"
9393
3) Generate .rs files:
9494

9595
```sh
96-
protoc --rust_out . foo.proto
96+
protoc --rs_out . foo.proto
9797
```
9898

9999
This will generate .rs files in current directory.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
protobuf_codegen::protoc_gen_rs::protoc_gen_rust_main();
3+
}

protobuf-codegen/src/bin/protoc-gen-rust.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

protobuf-codegen/src/codegen/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum CodegenError {
3434

3535
/// Entry point for `.proto` to `.rs` code generation.
3636
///
37-
/// This is similar to `protoc --rust_out...`.
37+
/// This is similar to `protoc --rs_out...`.
3838
#[derive(Debug, Default)]
3939
pub struct Codegen {
4040
/// What parser to use to parse `.proto` files.
@@ -208,8 +208,8 @@ impl Codegen {
208208

209209
/// Invoke the code generation.
210210
///
211-
/// This is roughly equivalent to `protoc --rust_out=...` but
212-
/// without requiring `protoc-gen-rust` command in `$PATH`.
211+
/// This is roughly equivalent to `protoc --rs_out=...` but
212+
/// without requiring `protoc-gen-rs` command in `$PATH`.
213213
///
214214
/// This function uses pure Rust parser or `protoc` parser depending on
215215
/// how this object was configured.

0 commit comments

Comments
 (0)