Synchronize crate names in Bazel and Buck with Cargo crate names
diff --git a/BUCK b/BUCK
index a173022..8b54d25 100644
--- a/BUCK
+++ b/BUCK
@@ -9,19 +9,23 @@
visibility = ["PUBLIC"],
deps = [
":core",
- ":macro",
+ ":cxxbridge-macro",
],
)
-rust_binary(
+alias(
name = "codegen",
+ actual = ":cxxbridge",
+ visibility = ["PUBLIC"],
+)
+
+rust_binary(
+ name = "cxxbridge",
srcs = glob(["gen/cmd/src/**/*.rs"]) + [
"gen/cmd/src/gen",
"gen/cmd/src/syntax",
],
- crate = "cxxbridge",
edition = "2018",
- visibility = ["PUBLIC"],
deps = [
"//third-party:clap",
"//third-party:codespan-reporting",
@@ -43,9 +47,8 @@
)
rust_library(
- name = "macro",
+ name = "cxxbridge-macro",
srcs = glob(["macro/src/**/*.rs"]) + ["macro/src/syntax"],
- crate = "cxxbridge_macro",
edition = "2018",
proc_macro = True,
deps = [
@@ -56,7 +59,7 @@
)
rust_library(
- name = "build",
+ name = "cxx-build",
srcs = glob(["gen/build/src/**/*.rs"]) + [
"gen/build/src/gen",
"gen/build/src/syntax",
@@ -74,7 +77,7 @@
)
rust_library(
- name = "lib",
+ name = "cxx-gen",
srcs = glob(["gen/lib/src/**/*.rs"]) + [
"gen/lib/src/gen",
"gen/lib/src/syntax",
diff --git a/BUILD b/BUILD
index 51bec2f..787994b 100644
--- a/BUILD
+++ b/BUILD
@@ -16,12 +16,17 @@
deps = [":core-lib"],
)
-rust_binary(
+alias(
name = "codegen",
+ actual = ":cxxbridge",
+ visibility = ["//visibility:public"],
+)
+
+rust_binary(
+ name = "cxxbridge",
srcs = glob(["gen/cmd/src/**/*.rs"]),
data = ["gen/cmd/src/gen/include/cxx.h"],
edition = "2018",
- visibility = ["//visibility:public"],
deps = [
"//third-party:clap",
"//third-party:codespan-reporting",
@@ -57,7 +62,7 @@
)
rust_library(
- name = "build",
+ name = "cxx-build",
srcs = glob(["gen/build/src/**/*.rs"]),
data = ["gen/build/src/gen/include/cxx.h"],
edition = "2018",
@@ -73,7 +78,7 @@
)
rust_library(
- name = "lib",
+ name = "cxx-gen",
srcs = glob(["gen/lib/src/**/*.rs"]),
data = ["gen/lib/src/gen/include/cxx.h"],
edition = "2018",