-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
90 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
# This directory contains the implementation of the proto! macro as a proc macro. | ||
# It has not yet been made to work with bazel and so no targets are defined here. | ||
|
||
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix") | ||
|
||
PROC_MACRO_IMPL_SRCS = ["proto_proc_macro_impl.rs"] | ||
|
||
pkg_files( | ||
name = "rust_protobuf_macros_src", | ||
srcs = PROC_MACRO_IMPL_SRCS, | ||
strip_prefix = strip_prefix.from_root("rust/proto_proc_macro"), | ||
) | ||
|
||
pkg_filegroup( | ||
name = "rust_protobuf_macros_src_dir", | ||
srcs = [ | ||
":rust_protobuf_macros_src", | ||
], | ||
prefix = "src", | ||
visibility = ["//rust/release_crates:__subpackages__"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") | ||
load("@rules_pkg//pkg:tar.bzl", "pkg_tar") | ||
load("//rust/release_crates:substitute_rust_release_version.bzl", "substitute_rust_release_version") | ||
|
||
pkg_tar( | ||
name = "protobuf_macros_crate", | ||
srcs = [ | ||
":crate_root_files", | ||
"//:LICENSE", | ||
"//rust/proto_proc_macro:rust_protobuf_macros_src_dir", | ||
], | ||
visibility = ["//rust:__subpackages__"], | ||
) | ||
|
||
pkg_files( | ||
name = "crate_root_files", | ||
srcs = [":srcs"], | ||
strip_prefix = strip_prefix.from_root("rust/release_crates/protobuf_macros"), | ||
) | ||
|
||
substitute_rust_release_version( | ||
src = "Cargo-template.toml", | ||
out = "Cargo.toml", | ||
) | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = [ | ||
"Cargo.toml", | ||
"README.md", | ||
], | ||
visibility = ["//rust:__subpackages__"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Protocol Buffers - Google's data interchange format | ||
# Copyright 2024 Google LLC. 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 | ||
|
||
[package] | ||
name = "protobuf-macros" | ||
version = "{VERSION}" | ||
edition = "2021" # The Rust edition (not to be confused with Protobuf Edition). | ||
license = "BSD-3-Clause" | ||
rust-version = "1.74" | ||
description = "Protobuf proc macro implementation (internal)" | ||
|
||
[lib] | ||
path = "src/proto_proc_macro_impl.rs" | ||
proc-macro = true | ||
|
||
[dependencies] | ||
quote = "1.0.38" | ||
syn = { version = "2.0.98", features = ["full"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Internal crate. Use [protobuf](http://crates.io/crates/protobuf) instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters