blob: f66146bee75f15b60568d904f474c670f8d24362 [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 = "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"],
)