@@ -7,14 +7,14 @@ This crate is useful mostly from `build.rs` scripts to generate `.rs` files duri
77# How to generate code
88
99There 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
1414Which one should you use depends on your needs.
1515
1616If 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
1919If 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
5959If 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
64640 ) Install protobuf for ` protoc ` binary.
6565
@@ -78,11 +78,11 @@ apt-get install protobuf-compiler
7878Protobuf is needed only for code generation, ` rust-protobuf ` runtime
7979does 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
8383It 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
8787If you installed it with cargo, it should be
8888
@@ -93,7 +93,7 @@ PATH="$HOME/.cargo/bin:$PATH"
93933 ) Generate .rs files:
9494
9595``` sh
96- protoc --rust_out . foo.proto
96+ protoc --rs_out . foo.proto
9797```
9898
9999This will generate .rs files in current directory.
0 commit comments