fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
3342d687
cleanup
1load ( "@rules_cc//cc:defs.bzl" , "cc_library" ) 2load ( 3"@rules_rust//rust:defs.bzl" , 4"rust_library" , 5"rust_test" , 6) 7 8# TODO: These targets started failing on windows after the Rust 1.78.0 upgrade. 9# https://github.com/bazelbuild/rules_rust/issues/2640 10INCOMPATIBLE_WINDOWS = select ({ 11"@platforms//os:windows" : [ "@platforms//:incompatible" ], 12"//conditions:default" : [], 13}) 14 15rust_library ( 16name = "transitive" , 17srcs = [ "transitive.rs" ], 18edition = "2018" , 19target_compatible_with = INCOMPATIBLE_WINDOWS , 20) 21 22cc_library ( 23name = "direct" , 24srcs = [ "direct.cc" ], 25hdrs = [ "direct.h" ], 26target_compatible_with = INCOMPATIBLE_WINDOWS , 27deps = [ ":transitive" ], 28) 29 30rust_test ( 31name = "main" , 32srcs = [ "main.rs" ], 33edition = "2018" , 34target_compatible_with = INCOMPATIBLE_WINDOWS , 35deps = [ ":direct" ], 36)