fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
23f99bb6
cleanup
1load ( "@bazel_skylib//rules:write_file.bzl" , "write_file" ) 2load ( "//crate_universe:defs.bzl" , "crate" , "render_config" , "splicing_config" ) 3 4# buildifier: disable=bzl-visibility 5load ( "//crate_universe/private:generate_utils.bzl" , "compile_config" ) 6 7# buildifier: disable=bzl-visibility 8load ( "//crate_universe/private:splicing_utils.bzl" , "compile_splicing_manifest" ) 9 10write_file ( 11name = "config" , 12out = "config.json" , 13content = [ json . encode ( 14compile_config ( 15cargo_config = None , 16crate_annotations = { 17"rand" : [ crate . annotation ( 18crate_features = [ "small_rng" ], 19version = "0.8.5" , 20)], 21}, 22generate_binaries = False , 23generate_build_scripts = False , 24generate_target_compatible_with = True , 25render_config = json . decode ( render_config ( 26platforms_template = "//custom/platform:{triple}" , 27regen_command = "cargo_bazel_regen_command" , 28)), 29repository_name = "mock_config" , 30supported_platform_triples = [ 31"x86_64-unknown-linux-gnu" , 32"x86_64-pc-windows-msvc" , 33"x86_64-apple-darwin" , 34], 35), 36). strip ()], 37newline = "unix" , 38) 39 40write_file ( 41name = "splicing_manifest" , 42out = "splicing_manifest.json" , 43content = [ json . encode ( compile_splicing_manifest ( 44cargo_config_path = "/tmp/abs/path/workspace/.cargo/config.toml" , 45manifests = { 46"${build_workspace_directory}/submod/Cargo.toml" : "//submod:Cargo.toml" , 47"${output_base}/external_crate/Cargo.toml" : "@external_crate//:Cargo.toml" , 48"/tmp/abs/path/workspace/Cargo.toml" : "//:Cargo.toml" , 49}, 50packages = { 51"cargo_toml" : crate . spec ( 52git = "https://gitlab.com/crates.rs/cargo_toml.git" , 53tag = "v0.15.2" , 54), 55"cfg-if" : crate . spec ( 56git = "https://github.com/rust-lang/cfg-if.git" , 57rev = "b9c2246a" , 58), 59"log" : crate . spec ( 60branch = "master" , 61git = "https://github.com/rust-lang/log.git" , 62), 63"rand" : crate . spec ( 64default_features = False , 65features = [ "small_rng" ], 66version = "0.8.5" , 67), 68}, 69splicing_config = dict ( json . decode ( splicing_config ( 70resolver_version = "2" , 71))), 72)). strip ()], 73newline = "unix" , 74) 75 76filegroup ( 77name = "serialized_configs" , 78srcs = [ 79"config.json" , 80"splicing_manifest.json" , 81], 82visibility = [ "//crate_universe:__pkg__" ], 83)