From 5679775d11f53a610f20a9e4ef58c8fbb18451b8 Mon Sep 17 00:00:00 2001 From: thesayyn Date: Fri, 15 Dec 2023 22:44:23 -0800 Subject: [PATCH] ci: release workflow --- .github/workflows/release.yaml | 40 ++++ .vscode/settings.json | 92 -------- build.rs | 8 +- include/test_messages_proto2.proto | 359 +++++++++++++++++++++++++++++ include/test_messages_proto3.proto | 265 +++++++++++++++++++++ targets.txt | 205 ++++++++++++++++ third_party/protobuf | 1 + 7 files changed, 875 insertions(+), 95 deletions(-) create mode 100644 .github/workflows/release.yaml delete mode 100644 .vscode/settings.json create mode 100644 include/test_messages_proto2.proto create mode 100644 include/test_messages_proto3.proto create mode 100644 targets.txt create mode 160000 third_party/protobuf diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bff4ace --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +on: + push: + branches: + - main + +name: Release + +jobs: + release: + name: Release - ${{ matrix.platform.target }} + strategy: + matrix: + platform: + - os: macos-14 + target: aarch64-apple-darwin + bin: conform + name: conform-darwin-am64.tar.gz + command: build + + runs-on: ${{ matrix.platform.os }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - run: | + cat include/conformance.cmake > third_party/protobuf/cmake/conformance.cmake + gcc --version + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Build binary + uses: houseabsolute/actions-rust-cross@v0 + with: + command: ${{ matrix.platform.command }} + target: ${{ matrix.platform.target }} + args: "--locked --release" + strip: true + \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index dd8a7d5..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "files.associations": { - "*.mtree": "ini", - "__bit_reference": "cpp", - "__bits": "cpp", - "__config": "cpp", - "__debug": "cpp", - "__errc": "cpp", - "__hash_table": "cpp", - "__locale": "cpp", - "__mutex_base": "cpp", - "__node_handle": "cpp", - "__split_buffer": "cpp", - "__threading_support": "cpp", - "__tree": "cpp", - "__tuple": "cpp", - "__verbose_abort": "cpp", - "any": "cpp", - "array": "cpp", - "atomic": "cpp", - "bit": "cpp", - "bitset": "cpp", - "cctype": "cpp", - "cfenv": "cpp", - "cinttypes": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "complex": "cpp", - "condition_variable": "cpp", - "csignal": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdint": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "deque": "cpp", - "exception": "cpp", - "forward_list": "cpp", - "fstream": "cpp", - "future": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "ios": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "list": "cpp", - "locale": "cpp", - "map": "cpp", - "memory": "cpp", - "mutex": "cpp", - "new": "cpp", - "optional": "cpp", - "ostream": "cpp", - "queue": "cpp", - "ratio": "cpp", - "regex": "cpp", - "scoped_allocator": "cpp", - "set": "cpp", - "sstream": "cpp", - "stack": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "string": "cpp", - "string_view": "cpp", - "system_error": "cpp", - "thread": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "typeindex": "cpp", - "typeinfo": "cpp", - "unordered_map": "cpp", - "unordered_set": "cpp", - "valarray": "cpp", - "variant": "cpp", - "vector": "cpp", - "__nullptr": "cpp", - "__string": "cpp", - "chrono": "cpp", - "compare": "cpp", - "concepts": "cpp", - "numeric": "cpp", - "random": "cpp", - "algorithm": "cpp", - "*.inc": "cpp" - } -} \ No newline at end of file diff --git a/build.rs b/build.rs index 6ec644e..9ca22f0 100644 --- a/build.rs +++ b/build.rs @@ -59,14 +59,16 @@ fn main() { println!("cargo:rustc-link-search=native={}", &out_dir.to_string()); println!("cargo:rustc-link-lib=conformance"); + println!("cargo:warning={}", &out_dir.to_string()); + // Proto protobuf_codegen::Codegen::new() .protoc() .include("third_party/protobuf/conformance") - .include("third_party/protobuf/src/") + .include("include") .input("third_party/protobuf/conformance/conformance.proto") - .input("third_party/protobuf/src/google/protobuf/test_messages_proto3.proto") - .input("third_party/protobuf/src/google/protobuf/test_messages_proto2.proto") + .input("include/test_messages_proto3.proto") + .input("include/test_messages_proto2.proto") .cargo_out_dir("conformance") .run_from_script(); } diff --git a/include/test_messages_proto2.proto b/include/test_messages_proto2.proto new file mode 100644 index 0000000..adb8db3 --- /dev/null +++ b/include/test_messages_proto2.proto @@ -0,0 +1,359 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +// +// Test schema for proto2 messages. This test schema is used by: +// +// - conformance tests +// + +// LINT: ALLOW_GROUPS + +syntax = "proto2"; + +package protobuf_test_messages.proto2; + +option java_package = "com.google.protobuf_test_messages.proto2"; +option objc_class_prefix = "Proto2"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +option cc_enable_arenas = true; + +// This proto includes every type of field in both singular and repeated +// forms. +// +// Also, crucially, all messages and enums in this file are eventually +// submessages of this message. So for example, a fuzz test of TestAllTypes +// could trigger bugs that occur in any message type in this file. We verify +// this stays true in a unit test. +message TestAllTypesProto2 { + message NestedMessage { + optional int32 a = 1; + optional TestAllTypesProto2 corecursive = 2; + } + + enum NestedEnum { + FOO = 0; + BAR = 1; + BAZ = 2; + NEG = -1; // Intentionally negative. + } + + // Singular + optional int32 optional_int32 = 1; + optional int64 optional_int64 = 2; + optional uint32 optional_uint32 = 3; + optional uint64 optional_uint64 = 4; + optional sint32 optional_sint32 = 5; + optional sint64 optional_sint64 = 6; + optional fixed32 optional_fixed32 = 7; + optional fixed64 optional_fixed64 = 8; + optional sfixed32 optional_sfixed32 = 9; + optional sfixed64 optional_sfixed64 = 10; + optional float optional_float = 11; + optional double optional_double = 12; + optional bool optional_bool = 13; + optional string optional_string = 14; + optional bytes optional_bytes = 15; + + optional NestedMessage optional_nested_message = 18; + optional ForeignMessageProto2 optional_foreign_message = 19; + + optional NestedEnum optional_nested_enum = 21; + optional ForeignEnumProto2 optional_foreign_enum = 22; + + optional string optional_string_piece = 24 [ctype = STRING_PIECE]; + optional string optional_cord = 25 [ctype = CORD]; + + optional TestAllTypesProto2 recursive_message = 27; + + // Repeated + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; + repeated sfixed32 repeated_sfixed32 = 39; + repeated sfixed64 repeated_sfixed64 = 40; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; + + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessageProto2 repeated_foreign_message = 49; + + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnumProto2 repeated_foreign_enum = 52; + + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; + + // Packed + repeated int32 packed_int32 = 75 [packed = true]; + repeated int64 packed_int64 = 76 [packed = true]; + repeated uint32 packed_uint32 = 77 [packed = true]; + repeated uint64 packed_uint64 = 78 [packed = true]; + repeated sint32 packed_sint32 = 79 [packed = true]; + repeated sint64 packed_sint64 = 80 [packed = true]; + repeated fixed32 packed_fixed32 = 81 [packed = true]; + repeated fixed64 packed_fixed64 = 82 [packed = true]; + repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + repeated float packed_float = 85 [packed = true]; + repeated double packed_double = 86 [packed = true]; + repeated bool packed_bool = 87 [packed = true]; + repeated NestedEnum packed_nested_enum = 88 [packed = true]; + + // Unpacked + repeated int32 unpacked_int32 = 89 [packed = false]; + repeated int64 unpacked_int64 = 90 [packed = false]; + repeated uint32 unpacked_uint32 = 91 [packed = false]; + repeated uint64 unpacked_uint64 = 92 [packed = false]; + repeated sint32 unpacked_sint32 = 93 [packed = false]; + repeated sint64 unpacked_sint64 = 94 [packed = false]; + repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + repeated float unpacked_float = 99 [packed = false]; + repeated double unpacked_double = 100 [packed = false]; + repeated bool unpacked_bool = 101 [packed = false]; + repeated NestedEnum unpacked_nested_enum = 102 [packed = false]; + + // Map + map map_int32_int32 = 56; + map map_int64_int64 = 57; + map map_uint32_uint32 = 58; + map map_uint64_uint64 = 59; + map map_sint32_sint32 = 60; + map map_sint64_sint64 = 61; + map map_fixed32_fixed32 = 62; + map map_fixed64_fixed64 = 63; + map map_sfixed32_sfixed32 = 64; + map map_sfixed64_sfixed64 = 65; + map map_int32_float = 66; + map map_int32_double = 67; + map map_bool_bool = 68; + map map_string_string = 69; + map map_string_bytes = 70; + map map_string_nested_message = 71; + map map_string_foreign_message = 72; + map map_string_nested_enum = 73; + map map_string_foreign_enum = 74; + + oneof oneof_field { + uint32 oneof_uint32 = 111; + NestedMessage oneof_nested_message = 112; + string oneof_string = 113; + bytes oneof_bytes = 114; + bool oneof_bool = 115; + uint64 oneof_uint64 = 116; + float oneof_float = 117; + double oneof_double = 118; + NestedEnum oneof_enum = 119; + } + + // extensions + extensions 120 to 200; + + // default values + optional int32 default_int32 = 241 [default = -123456789]; + optional int64 default_int64 = 242 [default = -9123456789123456789]; + optional uint32 default_uint32 = 243 [default = 2123456789]; + optional uint64 default_uint64 = 244 [default = 10123456789123456789]; + optional sint32 default_sint32 = 245 [default = -123456789]; + optional sint64 default_sint64 = 246 [default = -9123456789123456789]; + optional fixed32 default_fixed32 = 247 [default = 2123456789]; + optional fixed64 default_fixed64 = 248 [default = 10123456789123456789]; + optional sfixed32 default_sfixed32 = 249 [default = -123456789]; + optional sfixed64 default_sfixed64 = 250 [default = -9123456789123456789]; + optional float default_float = 251 [default = 9e9]; + optional double default_double = 252 [default = 7e22]; + optional bool default_bool = 253 [default = true]; + optional string default_string = 254 [default = "Rosebud"]; + optional bytes default_bytes = 255 [default = "joshua"]; + + // Test field-name-to-JSON-name convention. + // (protobuf says names can be any valid C/C++ identifier.) + optional int32 fieldname1 = 401; + optional int32 field_name2 = 402; + optional int32 _field_name3 = 403; + optional int32 field__name4_ = 404; + optional int32 field0name5 = 405; + optional int32 field_0_name6 = 406; + optional int32 fieldName7 = 407; + optional int32 FieldName8 = 408; + optional int32 field_Name9 = 409; + optional int32 Field_Name10 = 410; + optional int32 FIELD_NAME11 = 411; + optional int32 FIELD_name12 = 412; + optional int32 __field_name13 = 413; + optional int32 __Field_name14 = 414; + optional int32 field__name15 = 415; + optional int32 field__Name16 = 416; + optional int32 field_name17__ = 417; + optional int32 Field_name18__ = 418; + + // Reserved for unknown fields test. + reserved 1000 to 9999; + + // message_set test case. + message MessageSetCorrect { + option message_set_wire_format = true; + + extensions 4 to max; + } + + message MessageSetCorrectExtension1 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension1 message_set_extension = 1547769; + } + optional string str = 25; + } + + message MessageSetCorrectExtension2 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension2 message_set_extension = 4135312; + } + optional int32 i = 9; + } +} + +message ForeignMessageProto2 { + optional int32 c = 1; +} + +enum ForeignEnumProto2 { + FOREIGN_FOO = 0; + FOREIGN_BAR = 1; + FOREIGN_BAZ = 2; +} + +extend TestAllTypesProto2 { + optional int32 extension_int32 = 120; +} + +message UnknownToTestAllTypes { + optional int32 optional_int32 = 1001; + optional string optional_string = 1002; + optional ForeignMessageProto2 nested_message = 1003; + optional bool optional_bool = 1006; + repeated int32 repeated_int32 = 1011; +} + +message NullHypothesisProto2 {} + +message EnumOnlyProto2 { + enum Bool { + kFalse = 0; + kTrue = 1; + } +} + +message OneStringProto2 { + optional string data = 1; +} + +message ProtoWithKeywords { + optional int32 inline = 1; + optional string concept = 2; + repeated string requires = 3; +} + +message TestAllRequiredTypesProto2 { + message NestedMessage { + required int32 a = 1; + required TestAllRequiredTypesProto2 corecursive = 2; + optional TestAllRequiredTypesProto2 optional_corecursive = 3; + } + + enum NestedEnum { + FOO = 0; + BAR = 1; + BAZ = 2; + NEG = -1; // Intentionally negative. + } + + // Singular + required int32 required_int32 = 1; + required int64 required_int64 = 2; + required uint32 required_uint32 = 3; + required uint64 required_uint64 = 4; + required sint32 required_sint32 = 5; + required sint64 required_sint64 = 6; + required fixed32 required_fixed32 = 7; + required fixed64 required_fixed64 = 8; + required sfixed32 required_sfixed32 = 9; + required sfixed64 required_sfixed64 = 10; + required float required_float = 11; + required double required_double = 12; + required bool required_bool = 13; + required string required_string = 14; + required bytes required_bytes = 15; + + required NestedMessage required_nested_message = 18; + required ForeignMessageProto2 required_foreign_message = 19; + + required NestedEnum required_nested_enum = 21; + required ForeignEnumProto2 required_foreign_enum = 22; + + required string required_string_piece = 24 [ctype = STRING_PIECE]; + required string required_cord = 25 [ctype = CORD]; + + required TestAllRequiredTypesProto2 recursive_message = 27; + optional TestAllRequiredTypesProto2 optional_recursive_message = 28; + + // extensions + extensions 120 to 200; + + // default values + required int32 default_int32 = 241 [default = -123456789]; + required int64 default_int64 = 242 [default = -9123456789123456789]; + required uint32 default_uint32 = 243 [default = 2123456789]; + required uint64 default_uint64 = 244 [default = 10123456789123456789]; + required sint32 default_sint32 = 245 [default = -123456789]; + required sint64 default_sint64 = 246 [default = -9123456789123456789]; + required fixed32 default_fixed32 = 247 [default = 2123456789]; + required fixed64 default_fixed64 = 248 [default = 10123456789123456789]; + required sfixed32 default_sfixed32 = 249 [default = -123456789]; + required sfixed64 default_sfixed64 = 250 [default = -9123456789123456789]; + required float default_float = 251 [default = 9e9]; + required double default_double = 252 [default = 7e22]; + required bool default_bool = 253 [default = true]; + required string default_string = 254 [default = "Rosebud"]; + required bytes default_bytes = 255 [default = "joshua"]; + + // Reserved for unknown fields test. + reserved 1000 to 9999; + + // message_set test case. + message MessageSetCorrect { + option message_set_wire_format = true; + + extensions 4 to max; + } + + message MessageSetCorrectExtension1 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension1 message_set_extension = 1547769; + } + required string str = 25; + } + + message MessageSetCorrectExtension2 { + extend MessageSetCorrect { + optional MessageSetCorrectExtension2 message_set_extension = 4135312; + } + required int32 i = 9; + } +} diff --git a/include/test_messages_proto3.proto b/include/test_messages_proto3.proto new file mode 100644 index 0000000..55ec54c --- /dev/null +++ b/include/test_messages_proto3.proto @@ -0,0 +1,265 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd +// +// Test schema for proto3 messages. This test schema is used by: +// +// - benchmarks +// - fuzz tests +// - conformance tests +// + +syntax = "proto3"; + +package protobuf_test_messages.proto3; + +option java_package = "com.google.protobuf_test_messages.proto3"; +option objc_class_prefix = "Proto3"; + +// This is the default, but we specify it here explicitly. +option optimize_for = SPEED; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option cc_enable_arenas = true; + +// This proto includes every type of field in both singular and repeated +// forms. +// +// Also, crucially, all messages and enums in this file are eventually +// submessages of this message. So for example, a fuzz test of TestAllTypes +// could trigger bugs that occur in any message type in this file. We verify +// this stays true in a unit test. +message TestAllTypesProto3 { + message NestedMessage { + int32 a = 1; + TestAllTypesProto3 corecursive = 2; + } + + enum NestedEnum { + FOO = 0; + BAR = 1; + BAZ = 2; + NEG = -1; // Intentionally negative. + } + + enum AliasedEnum { + option allow_alias = true; + + ALIAS_FOO = 0; + ALIAS_BAR = 1; + ALIAS_BAZ = 2; + MOO = 2; + moo = 2; + bAz = 2; + } + + // Singular + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; + sfixed64 optional_sfixed64 = 10; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; + + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; + + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; + AliasedEnum optional_aliased_enum = 23; + + string optional_string_piece = 24 [ctype = STRING_PIECE]; + string optional_cord = 25 [ctype = CORD]; + + TestAllTypesProto3 recursive_message = 27; + + // Repeated + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; + repeated sfixed32 repeated_sfixed32 = 39; + repeated sfixed64 repeated_sfixed64 = 40; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; + + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; + + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; + + repeated string repeated_string_piece = 54 [ctype = STRING_PIECE]; + repeated string repeated_cord = 55 [ctype = CORD]; + + // Packed + repeated int32 packed_int32 = 75 [packed = true]; + repeated int64 packed_int64 = 76 [packed = true]; + repeated uint32 packed_uint32 = 77 [packed = true]; + repeated uint64 packed_uint64 = 78 [packed = true]; + repeated sint32 packed_sint32 = 79 [packed = true]; + repeated sint64 packed_sint64 = 80 [packed = true]; + repeated fixed32 packed_fixed32 = 81 [packed = true]; + repeated fixed64 packed_fixed64 = 82 [packed = true]; + repeated sfixed32 packed_sfixed32 = 83 [packed = true]; + repeated sfixed64 packed_sfixed64 = 84 [packed = true]; + repeated float packed_float = 85 [packed = true]; + repeated double packed_double = 86 [packed = true]; + repeated bool packed_bool = 87 [packed = true]; + repeated NestedEnum packed_nested_enum = 88 [packed = true]; + + // Unpacked + repeated int32 unpacked_int32 = 89 [packed = false]; + repeated int64 unpacked_int64 = 90 [packed = false]; + repeated uint32 unpacked_uint32 = 91 [packed = false]; + repeated uint64 unpacked_uint64 = 92 [packed = false]; + repeated sint32 unpacked_sint32 = 93 [packed = false]; + repeated sint64 unpacked_sint64 = 94 [packed = false]; + repeated fixed32 unpacked_fixed32 = 95 [packed = false]; + repeated fixed64 unpacked_fixed64 = 96 [packed = false]; + repeated sfixed32 unpacked_sfixed32 = 97 [packed = false]; + repeated sfixed64 unpacked_sfixed64 = 98 [packed = false]; + repeated float unpacked_float = 99 [packed = false]; + repeated double unpacked_double = 100 [packed = false]; + repeated bool unpacked_bool = 101 [packed = false]; + repeated NestedEnum unpacked_nested_enum = 102 [packed = false]; + + // Map + map map_int32_int32 = 56; + map map_int64_int64 = 57; + map map_uint32_uint32 = 58; + map map_uint64_uint64 = 59; + map map_sint32_sint32 = 60; + map map_sint64_sint64 = 61; + map map_fixed32_fixed32 = 62; + map map_fixed64_fixed64 = 63; + map map_sfixed32_sfixed32 = 64; + map map_sfixed64_sfixed64 = 65; + map map_int32_float = 66; + map map_int32_double = 67; + map map_bool_bool = 68; + map map_string_string = 69; + map map_string_bytes = 70; + map map_string_nested_message = 71; + map map_string_foreign_message = 72; + map map_string_nested_enum = 73; + map map_string_foreign_enum = 74; + + oneof oneof_field { + uint32 oneof_uint32 = 111; + NestedMessage oneof_nested_message = 112; + string oneof_string = 113; + bytes oneof_bytes = 114; + bool oneof_bool = 115; + uint64 oneof_uint64 = 116; + float oneof_float = 117; + double oneof_double = 118; + NestedEnum oneof_enum = 119; + google.protobuf.NullValue oneof_null_value = 120; + } + + // Well-known types + google.protobuf.BoolValue optional_bool_wrapper = 201; + google.protobuf.Int32Value optional_int32_wrapper = 202; + google.protobuf.Int64Value optional_int64_wrapper = 203; + google.protobuf.UInt32Value optional_uint32_wrapper = 204; + google.protobuf.UInt64Value optional_uint64_wrapper = 205; + google.protobuf.FloatValue optional_float_wrapper = 206; + google.protobuf.DoubleValue optional_double_wrapper = 207; + google.protobuf.StringValue optional_string_wrapper = 208; + google.protobuf.BytesValue optional_bytes_wrapper = 209; + + repeated google.protobuf.BoolValue repeated_bool_wrapper = 211; + repeated google.protobuf.Int32Value repeated_int32_wrapper = 212; + repeated google.protobuf.Int64Value repeated_int64_wrapper = 213; + repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214; + repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215; + repeated google.protobuf.FloatValue repeated_float_wrapper = 216; + repeated google.protobuf.DoubleValue repeated_double_wrapper = 217; + repeated google.protobuf.StringValue repeated_string_wrapper = 218; + repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219; + + google.protobuf.Duration optional_duration = 301; + google.protobuf.Timestamp optional_timestamp = 302; + google.protobuf.FieldMask optional_field_mask = 303; + google.protobuf.Struct optional_struct = 304; + google.protobuf.Any optional_any = 305; + google.protobuf.Value optional_value = 306; + google.protobuf.NullValue optional_null_value = 307; + + repeated google.protobuf.Duration repeated_duration = 311; + repeated google.protobuf.Timestamp repeated_timestamp = 312; + repeated google.protobuf.FieldMask repeated_fieldmask = 313; + repeated google.protobuf.Struct repeated_struct = 324; + repeated google.protobuf.Any repeated_any = 315; + repeated google.protobuf.Value repeated_value = 316; + repeated google.protobuf.ListValue repeated_list_value = 317; + + // Test field-name-to-JSON-name convention. + // (protobuf says names can be any valid C/C++ identifier.) + int32 fieldname1 = 401; + int32 field_name2 = 402; + int32 _field_name3 = 403; + int32 field__name4_ = 404; + int32 field0name5 = 405; + int32 field_0_name6 = 406; + int32 fieldName7 = 407; + int32 FieldName8 = 408; + int32 field_Name9 = 409; + int32 Field_Name10 = 410; + int32 FIELD_NAME11 = 411; + int32 FIELD_name12 = 412; + int32 __field_name13 = 413; + int32 __Field_name14 = 414; + int32 field__name15 = 415; + int32 field__Name16 = 416; + int32 field_name17__ = 417; + int32 Field_name18__ = 418; + + // Reserved for testing unknown fields + reserved 501 to 510; +} + +message ForeignMessage { + int32 c = 1; +} + +enum ForeignEnum { + FOREIGN_FOO = 0; + FOREIGN_BAR = 1; + FOREIGN_BAZ = 2; +} + +message NullHypothesisProto3 {} + +message EnumOnlyProto3 { + enum Bool { + kFalse = 0; + kTrue = 1; + } +} diff --git a/targets.txt b/targets.txt new file mode 100644 index 0000000..93d7c64 --- /dev/null +++ b/targets.txt @@ -0,0 +1,205 @@ +aarch64-apple-darwin +aarch64-apple-ios +aarch64-apple-ios-macabi +aarch64-apple-ios-sim +aarch64-apple-tvos +aarch64-apple-watchos-sim +aarch64-fuchsia +aarch64-kmc-solid_asp3 +aarch64-linux-android +aarch64-nintendo-switch-freestanding +aarch64-pc-windows-gnullvm +aarch64-pc-windows-msvc +aarch64-unknown-freebsd +aarch64-unknown-fuchsia +aarch64-unknown-hermit +aarch64-unknown-linux-gnu +aarch64-unknown-linux-gnu_ilp32 +aarch64-unknown-linux-musl +aarch64-unknown-linux-ohos +aarch64-unknown-netbsd +aarch64-unknown-none +aarch64-unknown-none-softfloat +aarch64-unknown-nto-qnx710 +aarch64-unknown-openbsd +aarch64-unknown-redox +aarch64-unknown-uefi +aarch64-uwp-windows-msvc +aarch64-wrs-vxworks +aarch64_be-unknown-linux-gnu +aarch64_be-unknown-linux-gnu_ilp32 +arm-linux-androideabi +arm-unknown-linux-gnueabi +arm-unknown-linux-gnueabihf +arm-unknown-linux-musleabi +arm-unknown-linux-musleabihf +arm64_32-apple-watchos +armeb-unknown-linux-gnueabi +armebv7r-none-eabi +armebv7r-none-eabihf +armv4t-none-eabi +armv4t-unknown-linux-gnueabi +armv5te-none-eabi +armv5te-unknown-linux-gnueabi +armv5te-unknown-linux-musleabi +armv5te-unknown-linux-uclibceabi +armv6-unknown-freebsd +armv6-unknown-netbsd-eabihf +armv6k-nintendo-3ds +armv7-apple-ios +armv7-linux-androideabi +armv7-sony-vita-newlibeabihf +armv7-unknown-freebsd +armv7-unknown-linux-gnueabi +armv7-unknown-linux-gnueabihf +armv7-unknown-linux-musleabi +armv7-unknown-linux-musleabihf +armv7-unknown-linux-ohos +armv7-unknown-linux-uclibceabi +armv7-unknown-linux-uclibceabihf +armv7-unknown-netbsd-eabihf +armv7-wrs-vxworks-eabihf +armv7a-kmc-solid_asp3-eabi +armv7a-kmc-solid_asp3-eabihf +armv7a-none-eabi +armv7a-none-eabihf +armv7k-apple-watchos +armv7r-none-eabi +armv7r-none-eabihf +armv7s-apple-ios +asmjs-unknown-emscripten +avr-unknown-gnu-atmega328 +bpfeb-unknown-none +bpfel-unknown-none +hexagon-unknown-linux-musl +i386-apple-ios +i586-pc-nto-qnx700 +i586-pc-windows-msvc +i586-unknown-linux-gnu +i586-unknown-linux-musl +i686-apple-darwin +i686-linux-android +i686-pc-windows-gnu +i686-pc-windows-msvc +i686-unknown-freebsd +i686-unknown-haiku +i686-unknown-linux-gnu +i686-unknown-linux-musl +i686-unknown-netbsd +i686-unknown-openbsd +i686-unknown-uefi +i686-uwp-windows-gnu +i686-uwp-windows-msvc +i686-wrs-vxworks +loongarch64-unknown-linux-gnu +m68k-unknown-linux-gnu +mips-unknown-linux-gnu +mips-unknown-linux-musl +mips-unknown-linux-uclibc +mips64-openwrt-linux-musl +mips64-unknown-linux-gnuabi64 +mips64-unknown-linux-muslabi64 +mips64el-unknown-linux-gnuabi64 +mips64el-unknown-linux-muslabi64 +mipsel-sony-psp +mipsel-sony-psx +mipsel-unknown-linux-gnu +mipsel-unknown-linux-musl +mipsel-unknown-linux-uclibc +mipsel-unknown-none +mipsisa32r6-unknown-linux-gnu +mipsisa32r6el-unknown-linux-gnu +mipsisa64r6-unknown-linux-gnuabi64 +mipsisa64r6el-unknown-linux-gnuabi64 +msp430-none-elf +nvptx64-nvidia-cuda +powerpc-unknown-freebsd +powerpc-unknown-linux-gnu +powerpc-unknown-linux-gnuspe +powerpc-unknown-linux-musl +powerpc-unknown-netbsd +powerpc-unknown-openbsd +powerpc-wrs-vxworks +powerpc-wrs-vxworks-spe +powerpc64-ibm-aix +powerpc64-unknown-freebsd +powerpc64-unknown-linux-gnu +powerpc64-unknown-linux-musl +powerpc64-unknown-openbsd +powerpc64-wrs-vxworks +powerpc64le-unknown-freebsd +powerpc64le-unknown-linux-gnu +powerpc64le-unknown-linux-musl +riscv32gc-unknown-linux-gnu +riscv32gc-unknown-linux-musl +riscv32i-unknown-none-elf +riscv32im-unknown-none-elf +riscv32imac-unknown-none-elf +riscv32imac-unknown-xous-elf +riscv32imc-esp-espidf +riscv32imc-unknown-none-elf +riscv64gc-unknown-freebsd +riscv64gc-unknown-fuchsia +riscv64gc-unknown-linux-gnu +riscv64gc-unknown-linux-musl +riscv64gc-unknown-none-elf +riscv64gc-unknown-openbsd +riscv64imac-unknown-none-elf +s390x-unknown-linux-gnu +s390x-unknown-linux-musl +sparc-unknown-linux-gnu +sparc64-unknown-linux-gnu +sparc64-unknown-netbsd +sparc64-unknown-openbsd +sparcv9-sun-solaris +thumbv4t-none-eabi +thumbv5te-none-eabi +thumbv6m-none-eabi +thumbv7a-pc-windows-msvc +thumbv7a-uwp-windows-msvc +thumbv7em-none-eabi +thumbv7em-none-eabihf +thumbv7m-none-eabi +thumbv7neon-linux-androideabi +thumbv7neon-unknown-linux-gnueabihf +thumbv7neon-unknown-linux-musleabihf +thumbv8m.base-none-eabi +thumbv8m.main-none-eabi +thumbv8m.main-none-eabihf +wasm32-unknown-emscripten +wasm32-unknown-unknown +wasm32-wasi +wasm64-unknown-unknown +x86_64-apple-darwin +x86_64-apple-ios +x86_64-apple-ios-macabi +x86_64-apple-tvos +x86_64-apple-watchos-sim +x86_64-fortanix-unknown-sgx +x86_64-fuchsia +x86_64-linux-android +x86_64-pc-nto-qnx710 +x86_64-pc-solaris +x86_64-pc-windows-gnu +x86_64-pc-windows-gnullvm +x86_64-pc-windows-msvc +x86_64-sun-solaris +x86_64-unknown-dragonfly +x86_64-unknown-freebsd +x86_64-unknown-fuchsia +x86_64-unknown-haiku +x86_64-unknown-hermit +x86_64-unknown-illumos +x86_64-unknown-l4re-uclibc +x86_64-unknown-linux-gnu +x86_64-unknown-linux-gnux32 +x86_64-unknown-linux-musl +x86_64-unknown-netbsd +x86_64-unknown-none +x86_64-unknown-openbsd +x86_64-unknown-redox +x86_64-unknown-uefi +x86_64-uwp-windows-gnu +x86_64-uwp-windows-msvc +x86_64-wrs-vxworks +x86_64h-apple-darwin diff --git a/third_party/protobuf b/third_party/protobuf new file mode 160000 index 0000000..690f100 --- /dev/null +++ b/third_party/protobuf @@ -0,0 +1 @@ +Subproject commit 690f100a6683d51779b3f0eb3300b8a5ff07a678