blob: 66dbd0dfd662398f99a28b126c9779f4e545b1c1 [file] [log] [blame]
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
load(
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
"rust_shared_library",
"rust_test",
)
cc_library(
name = "allocator_library",
srcs = ["allocator_library.cc"],
visibility = ["//visibility:public"],
)
cc_library(
name = "cclinkstampdep",
linkstamp = "cclinkstampdep.cc",
)
rust_library(
name = "rdep",
srcs = ["rdep.rs"],
edition = "2021",
)
rust_binary(
name = "bin",
srcs = ["bin.rs"],
edition = "2021",
deps = [
":cclinkstampdep",
":rdep",
],
)
rust_test(
name = "test",
srcs = ["test.rs"],
edition = "2021",
deps = [":rdep"],
)
rust_test(
name = "subdirectory/test",
srcs = ["test.rs"],
edition = "2021",
deps = [":rdep"],
)
rust_test(
name = "test-with-dashes-in-the-name",
srcs = ["test.rs"],
edition = "2021",
deps = [":rdep"],
)
rust_shared_library(
name = "cdylib",
srcs = ["lib.rs"],
edition = "2021",
)
cc_test(
name = "main",
srcs = [
"main.cc",
],
deps = [":cdylib"],
)