Debian Codegraph @

experimental/rust_cxx/BUILD.bazel

raw
1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
2 load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_static_library")
3 load("//bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")
4
5 rust_binary(
6 name = "rust_hello_world",
7 srcs = ["hello-world.rs"],
8 )
9
10 rust_cxx_bridge(
11 name = "hype_bridge",
12 src = "hype-bridge.rs",
13 )
14
15 cc_binary(
16 name = "cpp_with_rust",
17 srcs = ["main.cpp"],
18 deps = [
19 ":hype_bridge",
20 ":hype_lib",
21 ],
22 )
23
24 rust_static_library(
25 name = "hype_lib",
26 srcs = ["hype-bridge.rs"],
27 deps = ["@crates//:cxx"],
28 )