load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc") | |
package(default_visibility = ["//visibility:public"]) | |
rust_binary( | |
name = "hello_world", | |
srcs = ["src/main.rs"], | |
deps = [ | |
"//third-party/crates:anyhow", | |
], | |
) | |
rust_doc( | |
name = "hello_world_doc", | |
crate = ":hello_world", | |
) | |
sh_test( | |
name = "hello_world_test", | |
srcs = ["hello_world_test.sh"], | |
args = [ | |
"$(rlocationpath :hello_world)", | |
], | |
data = [ | |
":hello_world", | |
], | |
deps = [ | |
"@bazel_tools//tools/bash/runfiles", | |
], | |
) |