commit | 69d524d447bacf5d755489ef960db4bf4e70664b | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 06 17:40:44 2021 -0700 |
committer | Linux Build Service Account <lnxbuild@localhost> | Tue Apr 06 17:40:44 2021 -0700 |
tree | b8437a90846688be84adcc10dbe9584d9689e006 | |
parent | 6d8dcb7ecfe7eed549f6bd78f6cf976ba18c9cea [diff] | |
parent | 2c82fa1f02baadcf3aadb83499822a9a7c06a6ad [diff] |
Merge 2c82fa1f02baadcf3aadb83499822a9a7c06a6ad on remote branch Change-Id: I5380b8c9fc94b7040752841c4aec3435fda6cf4f
This crate contains protobuf code generator and a protoc-gen-rust
protoc
plugin.
protoc-gen-rust
implements standard protobuf protoc
plugin conventions.
Probably you do not want to use it directly in Rust environment, there are easier to use alternatives:
build.rs
of your project which requires only protoc
in $PATH
but not protoc-gen-rust
.protoc
binary(Note protoc
can be invoked programmatically with protoc crate)
protoc
binary.On OS X Homebrew can be used:
brew install protobuf
On Ubuntu, protobuf-compiler
package can be installed:
apt-get install protobuf-compiler
Protobuf is needed only for code generation, rust-protobuf
runtime does not use protobuf
library.
protoc-gen-rust
program (which is protoc
plugin)It can be installed either from source or with cargo install protobuf
command.
protoc-gen-rust
to $PATHIf you installed it with cargo, it should be
PATH="$HOME/.cargo/bin:$PATH"
protoc --rust_out . foo.proto
This will generate .rs files in current directory.