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"], )