Skip to content

Commit

Permalink
add rust_crate_group test
Browse files Browse the repository at this point in the history
  • Loading branch information
william-smith-skydio committed Feb 27, 2023
1 parent a6ecfd5 commit b8b0982
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/rust_crate_group/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
load("@rules_rust//rust:defs.bzl", "rust_crate_group", "rust_library")

rust_library(
name = "dep1",
srcs = ["dep1.rs"],
edition = "2021",
)

rust_library(
name = "dep2",
srcs = ["dep2.rs"],
edition = "2021",
)

rust_crate_group(
name = "dep1_and_2",
deps = [
":dep1",
":dep2",
],
)

rust_library(
name = "test",
srcs = ["lib.rs"],
edition = "2021",
deps = [":dep1_and_2"],
)
1 change: 1 addition & 0 deletions test/rust_crate_group/dep1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub fn dep1() {}
1 change: 1 addition & 0 deletions test/rust_crate_group/dep2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub fn dep2() {}
4 changes: 4 additions & 0 deletions test/rust_crate_group/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn _test() {
dep1::dep1();
dep2::dep2();
}

0 comments on commit b8b0982

Please sign in to comment.