Introduce BUILD files by the rust /cargo, /protobuf_codegen and protobuf_codegen/example directories.

PiperOrigin-RevId: 698062640
pull/19319/head
Protobuf Team Bot 4 months ago committed by Copybara-Service
parent c5cd6a2203
commit 320cd47cec
  1. 17
      csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs
  2. 18
      rust/BUILD
  3. 5
      rust/cargo/BUILD
  4. 5
      rust/protobuf_codegen/BUILD
  5. 5
      rust/protobuf_codegen/example/BUILD

@ -1,17 +0,0 @@
#region Copyright notice and license
// 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
#endregion
namespace Google.Protobuf.Reflection;
internal sealed partial class FeatureSetDescriptor
{
// Canonical serialized form of the edition defaults, generated by embed_edition_defaults.
private const string DefaultsBase64 =
"ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH";
}

@ -249,16 +249,20 @@ config_setting(
}, },
) )
# Note: strip_prefix.from_pkg() should work for this below, but has surprising behavior in bazel
# with filegroups and so we only use strip_prefix.from_root() and this constant instead.
SRC_ROOT = "rust"
pkg_files( pkg_files(
name = "rust_protobuf_src", name = "rust_protobuf_src",
srcs = glob(["*"]), srcs = glob(["*"]),
strip_prefix = strip_prefix.from_pkg(""), strip_prefix = strip_prefix.from_root(SRC_ROOT),
) )
pkg_files( pkg_files(
name = "crate_root_files", name = "crate_root_files",
srcs = glob(["cargo/**/*"]), srcs = ["//rust/cargo:srcs"],
strip_prefix = strip_prefix.from_pkg("/cargo"), strip_prefix = strip_prefix.from_root(SRC_ROOT + "/cargo"),
) )
pkg_filegroup( pkg_filegroup(
@ -297,8 +301,8 @@ pkg_tar(
pkg_files( pkg_files(
name = "protobuf_codegen_files", name = "protobuf_codegen_files",
srcs = glob(["protobuf_codegen/src/*"]) + ["protobuf_codegen/Cargo.toml"], srcs = ["//rust/protobuf_codegen:srcs"],
strip_prefix = strip_prefix.from_pkg("/protobuf_codegen"), strip_prefix = strip_prefix.from_root(SRC_ROOT + "/protobuf_codegen"),
) )
pkg_tar( pkg_tar(
@ -323,8 +327,8 @@ pkg_tar(
pkg_files( pkg_files(
name = "codegen_example_files", name = "codegen_example_files",
srcs = glob(["protobuf_codegen/example/**/*"]), srcs = ["//rust/protobuf_codegen/example:srcs"],
strip_prefix = strip_prefix.from_pkg("/protobuf_codegen/example"), strip_prefix = strip_prefix.from_root(SRC_ROOT + "/protobuf_codegen/example"),
) )
pkg_tar( pkg_tar(

@ -0,0 +1,5 @@
filegroup(
name = "srcs",
srcs = glob(["**/*"]),
visibility = ["//rust:__subpackages__"],
)

@ -0,0 +1,5 @@
filegroup(
name = "srcs",
srcs = glob(["**/*"]),
visibility = ["//rust:__subpackages__"],
)

@ -0,0 +1,5 @@
filegroup(
name = "srcs",
srcs = glob(["**/*"]),
visibility = ["//rust:__subpackages__"],
)
Loading…
Cancel
Save