Include comments in generated code
This commit is contained in:
parent
87772ea0a5
commit
b8002ea718
4 changed files with 2788 additions and 52 deletions
11
Cargo.toml
11
Cargo.toml
|
@ -6,10 +6,17 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
protobuf = "3.3.0"
|
|
||||||
|
[dependencies.protobuf]
|
||||||
|
version = "3.3.0"
|
||||||
|
#path = "../../Source/github.com/stepancheg/rust-protobuf/protobuf"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
protobuf-codegen = { version = "3.3.0", optional = true }
|
|
||||||
|
[build-dependencies.protobuf-codegen]
|
||||||
|
version = "3.3.0"
|
||||||
|
optional = true
|
||||||
|
#path = "../../Source/github.com/stepancheg/rust-protobuf/protobuf-codegen"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
codegen = ["protobuf-codegen"]
|
codegen = ["protobuf-codegen"]
|
||||||
|
|
3
build.rs
3
build.rs
|
@ -2,7 +2,8 @@ fn main() {
|
||||||
#[cfg(feature = "codegen")]
|
#[cfg(feature = "codegen")]
|
||||||
{
|
{
|
||||||
protobuf_codegen::Codegen::new()
|
protobuf_codegen::Codegen::new()
|
||||||
.pure()
|
.protoc()
|
||||||
|
.protoc_extra_arg("--include_source_info")
|
||||||
.includes(&["src"])
|
.includes(&["src"])
|
||||||
.input("src/api.proto")
|
.input("src/api.proto")
|
||||||
.input("src/api_options.proto")
|
.input("src/api_options.proto")
|
||||||
|
|
2763
src/generated/api.rs
2763
src/generated/api.rs
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
||||||
// This file is generated by rust-protobuf 3.3.0. Do not edit
|
// This file is generated by rust-protobuf 3.3.0. Do not edit
|
||||||
// .proto file is parsed by pure
|
// .proto file is parsed by protoc 25.1
|
||||||
// @generated
|
// @generated
|
||||||
|
|
||||||
// https://github.com/rust-lang/rust-clippy/issues/702
|
// https://github.com/rust-lang/rust-clippy/issues/702
|
||||||
|
@ -216,18 +216,57 @@ pub mod exts {
|
||||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||||
\n\x11api_options.proto\x1a\x20google/protobuf/descriptor.proto\"\x06\n\
|
\n\x11api_options.proto\x1a\x20google/protobuf/descriptor.proto\"\x06\n\
|
||||||
\x04void*F\n\rAPISourceType\x12\x0f\n\x0bSOURCE_BOTH\x10\0\x12\x11\n\rSO\
|
\x04void*F\n\rAPISourceType\x12\x0f\n\x0bSOURCE_BOTH\x10\0\x12\x11\n\rSO\
|
||||||
URCE_SERVER\x10\x01\x12\x11\n\rSOURCE_CLIENT\x10\x02:]\n\x16needs_setup_\
|
URCE_SERVER\x10\x01\x12\x11\n\rSOURCE_CLIENT\x10\x02:[\n\x16needs_setup_\
|
||||||
connection\x18\x8e\x08\x20\x01(\x08\x12\x1e.google.protobuf.MethodOption\
|
connection\x18\x8e\x08\x20\x01(\x08\x12\x1e.google.protobuf.MethodOption\
|
||||||
s:\x04trueR\x14needsSetupConnectionB\0:Z\n\x14needs_authentication\x18\
|
s:\x04trueR\x14needsSetupConnection:X\n\x14needs_authentication\x18\x8f\
|
||||||
\x8f\x08\x20\x01(\x08\x12\x1e.google.protobuf.MethodOptions:\x04trueR\
|
\x08\x20\x01(\x08\x12\x1e.google.protobuf.MethodOptions:\x04trueR\x13nee\
|
||||||
\x13needsAuthenticationB\0:5\n\x02id\x18\x8c\x08\x20\x01(\r\x12\x1f.goog\
|
dsAuthentication:3\n\x02id\x18\x8c\x08\x20\x01(\r\x12\x1f.google.protobu\
|
||||||
le.protobuf.MessageOptions:\x010R\x02idB\0:W\n\x06source\x18\x8d\x08\x20\
|
f.MessageOptions:\x010R\x02id:U\n\x06source\x18\x8d\x08\x20\x01(\x0e2\
|
||||||
\x01(\x0e2\x0e.APISourceType\x12\x1f.google.protobuf.MessageOptions:\x0b\
|
\x0e.APISourceType\x12\x1f.google.protobuf.MessageOptions:\x0bSOURCE_BOT\
|
||||||
SOURCE_BOTHR\x06sourceB\0:6\n\x05ifdef\x18\x8e\x08\x20\x01(\t\x12\x1f.go\
|
HR\x06source:6\n\x05ifdef\x18\x8e\x08\x20\x01(\t\x12\x1f.google.protobuf\
|
||||||
ogle.protobuf.MessageOptionsR\x05ifdef::\n\x03log\x18\x8f\x08\x20\x01(\
|
.MessageOptionsR\x05ifdef:8\n\x03log\x18\x8f\x08\x20\x01(\x08\x12\x1f.go\
|
||||||
\x08\x12\x1f.google.protobuf.MessageOptions:\x04trueR\x03logB\0:D\n\x08n\
|
ogle.protobuf.MessageOptions:\x04trueR\x03log:B\n\x08no_delay\x18\x90\
|
||||||
o_delay\x18\x90\x08\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptions:\
|
\x08\x20\x01(\x08\x12\x1f.google.protobuf.MessageOptions:\x05falseR\x07n\
|
||||||
\x05falseR\x07noDelayB\0b\x06proto2\
|
oDelayJ\xde\x06\n\x06\x12\x04\0\0\x17\x01\n\x08\n\x01\x0c\x12\x03\0\0\
|
||||||
|
\x12\n\t\n\x02\x03\0\x12\x03\x01\0*\n\n\n\x02\x05\0\x12\x04\x04\0\x08\
|
||||||
|
\x01\n\n\n\x03\x05\0\x01\x12\x03\x04\x05\x12\n\x0b\n\x04\x05\0\x02\0\x12\
|
||||||
|
\x03\x05\x04\x14\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x05\x04\x0f\n\x0c\n\
|
||||||
|
\x05\x05\0\x02\0\x02\x12\x03\x05\x12\x13\n\x0b\n\x04\x05\0\x02\x01\x12\
|
||||||
|
\x03\x06\x04\x16\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x06\x04\x11\n\x0c\
|
||||||
|
\n\x05\x05\0\x02\x01\x02\x12\x03\x06\x14\x15\n\x0b\n\x04\x05\0\x02\x02\
|
||||||
|
\x12\x03\x07\x04\x16\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x07\x04\x11\n\
|
||||||
|
\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x07\x14\x15\n\t\n\x02\x04\0\x12\x03\
|
||||||
|
\n\0\x0f\n\n\n\x03\x04\0\x01\x12\x03\n\x08\x0c\n\t\n\x01\x07\x12\x04\x0c\
|
||||||
|
\0\x0f\x01\n\t\n\x02\x07\0\x12\x03\r\x04?\n\n\n\x03\x07\0\x02\x12\x03\
|
||||||
|
\x0c\x07$\n\n\n\x03\x07\0\x04\x12\x03\r\x04\x0c\n\n\n\x03\x07\0\x05\x12\
|
||||||
|
\x03\r\r\x11\n\n\n\x03\x07\0\x01\x12\x03\r\x12(\n\n\n\x03\x07\0\x03\x12\
|
||||||
|
\x03\r+/\n\n\n\x03\x07\0\x08\x12\x03\r0>\n\n\n\x03\x07\0\x07\x12\x03\r9=\
|
||||||
|
\n\t\n\x02\x07\x01\x12\x03\x0e\x04=\n\n\n\x03\x07\x01\x02\x12\x03\x0c\
|
||||||
|
\x07$\n\n\n\x03\x07\x01\x04\x12\x03\x0e\x04\x0c\n\n\n\x03\x07\x01\x05\
|
||||||
|
\x12\x03\x0e\r\x11\n\n\n\x03\x07\x01\x01\x12\x03\x0e\x12&\n\n\n\x03\x07\
|
||||||
|
\x01\x03\x12\x03\x0e)-\n\n\n\x03\x07\x01\x08\x12\x03\x0e.<\n\n\n\x03\x07\
|
||||||
|
\x01\x07\x12\x03\x0e7;\n\t\n\x01\x07\x12\x04\x11\0\x17\x01\n\t\n\x02\x07\
|
||||||
|
\x02\x12\x03\x12\x04*\n\n\n\x03\x07\x02\x02\x12\x03\x11\x07%\n\n\n\x03\
|
||||||
|
\x07\x02\x04\x12\x03\x12\x04\x0c\n\n\n\x03\x07\x02\x05\x12\x03\x12\r\x13\
|
||||||
|
\n\n\n\x03\x07\x02\x01\x12\x03\x12\x14\x16\n\n\n\x03\x07\x02\x03\x12\x03\
|
||||||
|
\x12\x19\x1d\n\n\n\x03\x07\x02\x08\x12\x03\x12\x1e)\n\n\n\x03\x07\x02\
|
||||||
|
\x07\x12\x03\x12'(\n\t\n\x02\x07\x03\x12\x03\x13\x04?\n\n\n\x03\x07\x03\
|
||||||
|
\x02\x12\x03\x11\x07%\n\n\n\x03\x07\x03\x04\x12\x03\x13\x04\x0c\n\n\n\
|
||||||
|
\x03\x07\x03\x06\x12\x03\x13\r\x1a\n\n\n\x03\x07\x03\x01\x12\x03\x13\x1b\
|
||||||
|
!\n\n\n\x03\x07\x03\x03\x12\x03\x13$(\n\n\n\x03\x07\x03\x08\x12\x03\x13)\
|
||||||
|
>\n\n\n\x03\x07\x03\x07\x12\x03\x132=\n\t\n\x02\x07\x04\x12\x03\x14\x04!\
|
||||||
|
\n\n\n\x03\x07\x04\x02\x12\x03\x11\x07%\n\n\n\x03\x07\x04\x04\x12\x03\
|
||||||
|
\x14\x04\x0c\n\n\n\x03\x07\x04\x05\x12\x03\x14\r\x13\n\n\n\x03\x07\x04\
|
||||||
|
\x01\x12\x03\x14\x14\x19\n\n\n\x03\x07\x04\x03\x12\x03\x14\x1c\x20\n\t\n\
|
||||||
|
\x02\x07\x05\x12\x03\x15\x04,\n\n\n\x03\x07\x05\x02\x12\x03\x11\x07%\n\n\
|
||||||
|
\n\x03\x07\x05\x04\x12\x03\x15\x04\x0c\n\n\n\x03\x07\x05\x05\x12\x03\x15\
|
||||||
|
\r\x11\n\n\n\x03\x07\x05\x01\x12\x03\x15\x12\x15\n\n\n\x03\x07\x05\x03\
|
||||||
|
\x12\x03\x15\x18\x1c\n\n\n\x03\x07\x05\x08\x12\x03\x15\x1d+\n\n\n\x03\
|
||||||
|
\x07\x05\x07\x12\x03\x15&*\n\t\n\x02\x07\x06\x12\x03\x16\x042\n\n\n\x03\
|
||||||
|
\x07\x06\x02\x12\x03\x11\x07%\n\n\n\x03\x07\x06\x04\x12\x03\x16\x04\x0c\
|
||||||
|
\n\n\n\x03\x07\x06\x05\x12\x03\x16\r\x11\n\n\n\x03\x07\x06\x01\x12\x03\
|
||||||
|
\x16\x12\x1a\n\n\n\x03\x07\x06\x03\x12\x03\x16\x1d!\n\n\n\x03\x07\x06\
|
||||||
|
\x08\x12\x03\x16\"1\n\n\n\x03\x07\x06\x07\x12\x03\x16+0\
|
||||||
";
|
";
|
||||||
|
|
||||||
/// `FileDescriptorProto` object which was a source for this generated file
|
/// `FileDescriptorProto` object which was a source for this generated file
|
||||||
|
|
Loading…
Reference in a new issue