-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathBUILD
More file actions
39 lines (33 loc) · 765 Bytes
/
BUILD
File metadata and controls
39 lines (33 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load(
"@rules_rust//rust:defs.bzl",
"rust_library",
)
load(
"//cc_bindings_from_rs/bazel_support:cc_bindings_from_rust_rule.bzl",
"cc_bindings_from_rust",
)
load(
"//cc_bindings_from_rs/test/golden:golden_test.bzl",
"golden_test",
)
package(default_applicable_licenses = ["//:license"])
licenses(["notice"])
rust_library(
name = "example_crate",
srcs = ["example.rs"],
)
cc_bindings_from_rust(
name = "example_crate_cc_api",
crate = ":example_crate",
)
cc_binary(
name = "main",
srcs = ["main.cc"],
deps = [":example_crate_cc_api"],
)
golden_test(
name = "example_golden_test",
golden_h = "example_generated.h",
rust_library = "example_crate",
)