Skip to content

Commit

Permalink
Merge pull request #954 from hlopko/use_defs_bzl
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored Oct 27, 2021
2 parents 6fec63d + 2040717 commit 6d6a93d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library", "rust_proc_macro")

rust_library(
name = "cxx",
Expand Down Expand Up @@ -39,10 +39,9 @@ cc_library(
hdrs = ["include/cxx.h"],
)

rust_library(
rust_proc_macro(
name = "cxxbridge-macro",
srcs = glob(["macro/src/**"]),
crate_type = "proc-macro",
deps = [
"//third-party:proc-macro2",
"//third-party:quote",
Expand Down
2 changes: 1 addition & 1 deletion book/src/build/bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def rust_cxx_bridge(name, src, deps = []):
# demo/BUILD

load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_rust//rust:rust.bzl", "rust_binary")
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")

rust_binary(
Expand Down
2 changes: 1 addition & 1 deletion demo/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_rust//rust:rust.bzl", "rust_binary")
load("@rules_rust//rust:defs.bzl", "rust_binary")
load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")

rust_binary(
Expand Down
2 changes: 1 addition & 1 deletion tests/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_rust//rust:rust.bzl", "rust_library", "rust_test")
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")

rust_test(
Expand Down
2 changes: 1 addition & 1 deletion tools/bazel/third_party.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_rust//cargo:cargo_build_script.bzl", "cargo_build_script")
load("@rules_rust//rust:rust.bzl", "rust_binary", "rust_library")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
load("@third-party//:vendor.bzl", "vendored")

def third_party_glob(include):
Expand Down
2 changes: 1 addition & 1 deletion tools/bazel/vendor.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ of a crate in the current workspace.
"""

load("@rules_rust//rust:repositories.bzl", "load_arbitrary_tool")
load("@rules_rust//rust:rust.bzl", "rust_common")
load("@rules_rust//rust:defs.bzl", "rust_common")

def _impl(repository_ctx):
# Link cxx repository into @third-party.
Expand Down

0 comments on commit 6d6a93d

Please sign in to comment.