fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
3b65db8d
cleanup
1load ( "@aspect_bazel_lib//lib:transitions.bzl" , "platform_transition_binary" ) 2load ( "@bazel_skylib//rules:build_test.bzl" , "build_test" ) 3load ( "@rules_rust//rust:defs.bzl" , "rust_binary" ) 4 5rust_binary ( 6name = "hello" , 7srcs = [ "src/main.rs" ], 8tags = [ "manual" ], 9) 10 11platform_transition_binary ( 12name = "hello_linux_x86_64_musl" , 13binary = ":hello" , 14target_platform = "//platforms:linux_x86_64_musl" , 15) 16 17sh_test ( 18name = "hello_linux_x86_64_musl_test" , 19srcs = [ "hello_linux_musl_test.sh" ], 20args = [ 21"$(rootpath :hello_linux_x86_64_musl)" , 22"'ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked'" , 23], 24data = [ ":hello_linux_x86_64_musl" ], 25) 26 27platform_transition_binary ( 28name = "hello_linux_arm64_musl" , 29binary = ":hello" , 30target_platform = "//platforms:linux_arm64_musl" , 31) 32 33sh_test ( 34name = "hello_linux_arm64_musl_test" , 35srcs = [ "hello_linux_musl_test.sh" ], 36args = [ 37"$(rootpath :hello_linux_arm64_musl)" , 38"'ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked'" , 39], 40data = [ ":hello_linux_arm64_musl" ], 41) 42 43rust_binary ( 44name = "keyring" , 45srcs = [ "src/keyring.rs" ], 46tags = [ "manual" ], 47deps = [ "@cu//:keyring" ], 48) 49 50platform_transition_binary ( 51name = "keyring_linux_x86_64_musl" , 52binary = ":keyring" , 53target_platform = "//platforms:linux_x86_64_musl" , 54) 55 56build_test ( 57name = "keyring_linux_x86_64_musl_build_test" , 58targets = [ ":keyring_linux_x86_64_musl" ], 59)