Skip to content

Commit

Permalink
Format PR 1416 with buildifier
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 24, 2024
1 parent c6f9191 commit cdf98a1
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ rust_test(

rust_library(
name = "cxx_test_suite",
testonly = True,
srcs = [
"ffi/cast.rs",
"ffi/lib.rs",
@@ -25,11 +26,11 @@ rust_library(
":impl",
"//:cxx",
],
testonly = True,
)

cc_library(
name = "impl",
testonly = True,
srcs = [
"ffi/tests.cc",
":bridge/source",
@@ -41,19 +42,18 @@ cc_library(
":module/include",
"//:core",
],
testonly = True,
)

rust_cxx_bridge(
name = "bridge",
testonly = True,
src = "ffi/lib.rs",
deps = [":impl"],
testonly = True,
)

rust_cxx_bridge(
name = "module",
testonly = True,
src = "ffi/module.rs",
deps = [":impl"],
testonly = True,
)
10 changes: 5 additions & 5 deletions tools/bazel/rust_cxx_bridge.bzl
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@ def rust_cxx_bridge(name, src, deps = [], **kwargs):
native.alias(
name = "%s/header" % name,
actual = src + ".h",
**kwargs,
**kwargs
)

native.alias(
name = "%s/source" % name,
actual = src + ".cc",
**kwargs,
**kwargs
)

run_binary(
@@ -38,18 +38,18 @@ def rust_cxx_bridge(name, src, deps = [], **kwargs):
"$(location %s.cc)" % src,
],
tool = "@cxx.rs//:codegen",
**kwargs,
**kwargs
)

cc_library(
name = name,
srcs = [src + ".cc"],
deps = deps + [":%s/include" % name],
**kwargs,
**kwargs
)

cc_library(
name = "%s/include" % name,
hdrs = [src + ".h"],
**kwargs,
**kwargs
)

0 comments on commit cdf98a1

Please sign in to comment.