Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When this option is specified, codegens generate
mod.rs
whichpub use
all the generated files.For the test included in this PR, generated
$OUT_DIR/include_generated/mod.rs
contains:This way:
foo::bar
forfoo/bar.proto
)If you want to review this diff (and please do review!) start with looking at
protobuf-test/src/include_generated/mod.rs
in this PR.gen_mod_rs
option can be specifiedCustomize
struct when codegen is invoked programmaticallyprotoc --rust_opt=gen_mod_rs=true --rust_out=...
when invokingprotoc
commandWhen landed this option will be backported to the stable branch (v2), and likely will be on by default in the next stable version (v3).