fork/rules_rust
git clone https://git.julia.blue/fork/rules_rust
36b57af7
rust-analyzer
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 , 24render_config = json . decode ( render_config ( 25platforms_template = "//custom/platform:{triple}" , 26regen_command = "cargo_bazel_regen_command" , 27)), 28repository_name = "mock_config" , 29supported_platform_triples = [ 30"x86_64-unknown-linux-gnu" , 31"x86_64-pc-windows-msvc" , 32"x86_64-apple-darwin" , 33], 34), 35). strip ()], 36newline = "unix" , 37) 38 39write_file ( 40name = "splicing_manifest" , 41out = "splicing_manifest.json" , 42content = [ json . encode ( compile_splicing_manifest ( 43cargo_config_path = "/tmp/abs/path/workspace/.cargo/config.toml" , 44manifests = { 45"${build_workspace_directory}/submod/Cargo.toml" : "//submod:Cargo.toml" , 46"${output_base}/external_crate/Cargo.toml" : "@external_crate//:Cargo.toml" , 47"/tmp/abs/path/workspace/Cargo.toml" : "//:Cargo.toml" , 48}, 49packages = { 50"rand" : crate . spec ( 51default_features = False , 52features = [ "small_rng" ], 53version = "0.8.5" , 54), 55}, 56splicing_config = dict ( json . decode ( splicing_config ( 57resolver_version = "2" , 58))), 59)). strip ()], 60newline = "unix" , 61) 62 63filegroup ( 64name = "serialized_configs" , 65srcs = [ 66"config.json" , 67"splicing_manifest.json" , 68], 69visibility = [ "//crate_universe:__pkg__" ], 70)