From 816751749fdaf4fe52cf793c54ad76a833d6d143 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Wed, 8 Jan 2025 21:03:45 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20bazelbui?= =?UTF-8?q?ld/rules=5Frust@2435cae9b0c270a118e35bd9f08dccbf462f24de=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions.html | 26 -------------------------- print.html | 40 +++++++--------------------------------- searchindex.js | 2 +- searchindex.json | 2 +- 4 files changed, 9 insertions(+), 61 deletions(-) diff --git a/extensions.html b/extensions.html index 594e01dd3b..999926f084 100755 --- a/extensions.html +++ b/extensions.html @@ -156,32 +156,6 @@

rules_rust

Extensions

-

Bazel rules for interfacing with other rules and integrations with popular 3rd party tools.

-

Setup

-

The extension rules are released with each release of rules_rust (core) which can be found on the GitHub Releases page. We recommend using the latest release from that page.

-

Bzlmod

-

Note that rules_rust bzlmod support is still a work in progress. Most features should work, but bugs are more likely. This is not a desired end-state - please report (or better yet, help fix!) bugs you run into.

-

To use rules_rust extensions in a project using bzlmod, add the following to your MODULE.bazel file:

-
bazel_dep(name = "rules_rust_{EXTENSION}", version = "{VERSION}")
-
-

Don't forget to substitute in your desired release's version number and {EXTENSION} with the -name of the desired extension. E.g.:

-
bazel_dep(name = "rules_rust_bindgen", version = "0.55.0")
-
-

WORKSPACE

-

To use rules_rust extensions in a project using a WORKSPACE file, add the following to your WORKSPACE file to add the external repositories for the Rust toolchain:

-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
-# To find additional information on this release or newer ones visit:
-# https://github.com/bazelbuild/rules_rust/releases
-http_archive(
-    name = "rules_rust_{EXTENSION}",
-    # See releases page
-)
-
-# Refer to the documentation of the desired rules for how to load other necessary dependencies.
-
-

Don't forget to substitute in your desired release's version number, integrity hash, and {EXTENSION} with the name of the desired extension.

diff --git a/print.html b/print.html index 51481534a3..c867627db1 100755 --- a/print.html +++ b/print.html @@ -2984,32 +2984,6 @@

Extensions

-

Bazel rules for interfacing with other rules and integrations with popular 3rd party tools.

-

Setup

-

The extension rules are released with each release of rules_rust (core) which can be found on the GitHub Releases page. We recommend using the latest release from that page.

-

Bzlmod

-

Note that rules_rust bzlmod support is still a work in progress. Most features should work, but bugs are more likely. This is not a desired end-state - please report (or better yet, help fix!) bugs you run into.

-

To use rules_rust extensions in a project using bzlmod, add the following to your MODULE.bazel file:

-
bazel_dep(name = "rules_rust_{EXTENSION}", version = "{VERSION}")
-
-

Don't forget to substitute in your desired release's version number and {EXTENSION} with the -name of the desired extension. E.g.:

-
bazel_dep(name = "rules_rust_bindgen", version = "0.55.0")
-
-

WORKSPACE

-

To use rules_rust extensions in a project using a WORKSPACE file, add the following to your WORKSPACE file to add the external repositories for the Rust toolchain:

-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-
-# To find additional information on this release or newer ones visit:
-# https://github.com/bazelbuild/rules_rust/releases
-http_archive(
-    name = "rules_rust_{EXTENSION}",
-    # See releases page
-)
-
-# Refer to the documentation of the desired rules for how to load other necessary dependencies.
-
-

Don't forget to substitute in your desired release's version number, integrity hash, and {EXTENSION} with the name of the desired extension.

rules_rust_bindgen

These rules are for using Bindgen to generate Rust bindings to C (and some C++) libraries.

@@ -3019,7 +2993,7 @@

Rules

  • rust_bindgen_library
  • rust_bindgen_toolchain
  • -

    Setup

    +

    Setup

    To use the Rust bindgen rules, add the following to your WORKSPACE file to add the external repositories for the Rust bindgen toolchain (in addition to the rust rules setup):

    load("@rules_rust_bindgen//:repositories.bzl", "rust_bindgen_dependencies", "rust_bindgen_register_toolchains")
    @@ -3127,11 +3101,11 @@ 

    Rules

  • mdbook_server
  • mdbook_toolchain
  • -

    Setup

    -

    bzlmod

    +

    Setup

    +

    bzlmod

    bazel_dep(name = "rules_rust_mdbook", version = "{SEE_RELEASE_NOTES}")
     
    -

    WORKSPACE

    +

    WORKSPACE

    load("@rules_rust_mdbook//:repositories.bzl", "mdbook_register_toolchains", "rules_mdbook_dependencies")
     
     rules_mdbook_dependencies()
    @@ -3199,7 +3173,7 @@ 

    Rules

  • rust_prost_library
  • rust_prost_toolchain
  • -

    Setup

    +

    Setup

    load("@rules_rust//proto/prost:repositories.bzl", "rust_prost_dependencies")
     
     rust_prost_dependencies()
    @@ -3390,7 +3364,7 @@ 

    rus

    rules_rust_protobuf

    These build rules are used for building protobufs/gRPC in Rust with Bazel using rust-protobuf.

    -

    Setup

    +

    Setup

    To use the Rust proto rules, add the following to your WORKSPACE file to add the external repositories for the Rust proto toolchain (in addition to the rust rules setup):

    load("@rules_rust//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies", "rust_proto_protobuf_register_toolchains")
    @@ -3549,7 +3523,7 @@ 

    Rules

  • rust_wasm_bindgen
  • rust_wasm_bindgen_toolchain
  • -

    Setup

    +

    Setup

    To begin using the wasm-bindgen rules, users can load the necessary dependencies in their workspace by adding the following to their WORKSPACE.bazel file.

    load("@rules_rust_wasm_bindgen//:repositories.bzl", "rust_wasm_bindgen_dependencies", "rust_wasm_bindgen_register_toolchains")
    diff --git a/searchindex.js b/searchindex.js
    index d35210eb37..a0a4bc5773 100755
    --- a/searchindex.js
    +++ b/searchindex.js
    @@ -1 +1 @@
    -Object.assign(window.search, {"doc_urls":["index.html#rules-rust","index.html#setup","index.html#bzlmod","index.html#workspace","index.html#specifying-rust-version","index.html#supported-bazel-versions","index.html#supported-platforms","rules.html#rules","rules.html#experimental-rules","rules.html#3rd-party-rules","rules.html#full-api","rust.html#rules","rust.html#functions","rust.html#rust_binary","rust.html#rust_library","rust.html#rust_library_group","rust.html#rust_proc_macro","rust.html#rust_shared_library","rust.html#rust_static_library","rust.html#rust_test","rust.html#example-test-directory","rust.html#rust_test_suite","rust_clippy.html#overview","rust_clippy.html#setup","rust_clippy.html#rules","rust_clippy.html#aspects","rust_clippy.html#rust_clippy","rust_clippy.html#rust_clippy_aspect","rust_fmt.html#overview","rust_fmt.html#setup","rust_fmt.html#tips","rust_fmt.html#rules","rust_fmt.html#aspects","rust_fmt.html#rustfmt_test","rust_fmt.html#rustfmt_aspect","rust_doc.html#rules","rust_doc.html#rust_doc","rust_doc.html#rust_doc_test","cargo.html#cargo","cargo.html#rules","cargo.html#functions","cargo.html#repository-rules","cargo.html#cargo_dep_env","cargo.html#cargo_build_script","cargo.html#cargo_env","cargo.html#cargo_bootstrap_repository","rust_analyzer.html#overview","rust_analyzer.html#setup","rust_analyzer.html#aspects","rust_analyzer.html#rust_analyzer_aspect","settings.html#settings","rust_settings.html#rust-settings","rust_settings.html#capture_clippy_output","rust_settings.html#clippy_flag","rust_settings.html#clippy_flags","rust_settings.html#clippy_toml","rust_settings.html#codegen_units","rust_settings.html#error_format","rust_settings.html#experimental_link_std_dylib","rust_settings.html#experimental_per_crate_rustc_flag","rust_settings.html#experimental_use_cc_common_link","rust_settings.html#experimental_use_coverage_metadata_files","rust_settings.html#experimental_use_global_allocator","rust_settings.html#experimental_use_sh_toolchain_for_bootstrap_process_wrapper","rust_settings.html#extra_exec_rustc_flag","rust_settings.html#extra_exec_rustc_flags","rust_settings.html#extra_rustc_flag","rust_settings.html#extra_rustc_flags","rust_settings.html#incompatible_change_rust_test_compilation_output_directory","rust_settings.html#incompatible_do_not_include_data_in_compile_data","rust_settings.html#lto","rust_settings.html#no_std","rust_settings.html#pipelined_compilation","rust_settings.html#rename_first_party_crates","rust_settings.html#rustc_output_diagnostics","rust_settings.html#rustfmt_toml","rust_settings.html#third_party_dir","rust_settings.html#toolchain_generated_sysroot","rust_settings.html#unpretty","rust_settings.html#use_real_import_macro","cargo_settings.html#cargo-settings","cargo_settings.html#cargo_manifest_dir_filename_suffixes_to_retain","cargo_settings.html#debug_std_streams_output_group","cargo_settings.html#experimental_symlink_execroot","cargo_settings.html#incompatible_runfiles_cargo_manifest_dir","cargo_settings.html#use_default_shell_env","rust_toolchains.html#rust-toolchains","rust_toolchains.html#rules","rust_toolchains.html#rust_analyzer_toolchain","rust_toolchains.html#rust_toolchain","rust_toolchains.html#rustfmt_toolchain","rust_repositories.html#rust-repositories","rust_repositories.html#functions","rust_repositories.html#repository-rules","rust_repositories.html#rules_rust_dependencies","rust_repositories.html#rust_analyzer_toolchain_repository","rust_repositories.html#rust_register_toolchains","rust_repositories.html#rust_repositories","rust_repositories.html#rust_repository_set","rust_repositories.html#rust_toolchain_repository","rust_repositories.html#rust_toolchain_repository_proxy","rust_repositories.html#rust_toolchain_tools_repository","external_crates.html#external-dependencies","crate_universe_bzlmod.html#crate-universe","crate_universe_bzlmod.html#table-of-contents","crate_universe_bzlmod.html#setup","crate_universe_bzlmod.html#dependencies","crate_universe_bzlmod.html#cargo-workspaces","crate_universe_bzlmod.html#direct-dependencies","crate_universe_bzlmod.html#vendored-dependencies","crate_universe_bzlmod.html#crate","crate_universe_bzlmod.html#annotation","crate_universe_bzlmod.html#from_cargo","crate_universe_bzlmod.html#from_specs","crate_universe_bzlmod.html#render_config","crate_universe_bzlmod.html#spec","crate_universe_bzlmod.html#splicing_config","crate_universe.html#crate-universe","crate_universe.html#setup","crate_universe.html#rules","crate_universe.html#utility-macros","crate_universe.html#workflows","crate_universe.html#cargo-workspaces","crate_universe.html#direct-packages","crate_universe.html#binary-dependencies","crate_universe.html#dependencies-api","crate_universe.html#building-crates-with-complicated-dependencies","crate_universe.html#some-things-work-without-intervention","crate_universe.html#supplying-extra-tools-to-build","crate_universe.html#building-with-bazel-and-supplying-via-an-override","crate_universe.html#crates_vendor","crate_universe.html#repinning--updating-dependencies","crate_universe.html#crateannotation","crate_universe.html#crateselect","crate_universe.html#cratespec","crate_universe.html#crateworkspace_member","crate_universe.html#render_config","crate_universe.html#splicing_config","crate_universe.html#crates_repository","crate_universe.html#repinning--updating-dependencies-1","upstream_tooling.html#upstream-tooling","extensions.html#extensions","extensions.html#setup","extensions.html#bzlmod","extensions.html#workspace","rust_bindgen.html#rules_rust_bindgen","rust_bindgen.html#rules","rust_bindgen.html#setup","rust_bindgen.html#rust_bindgen","rust_bindgen.html#rust_bindgen_toolchain","rust_bindgen.html#rust_bindgen_library","rust_mdbook.html#rules_rust_mdbook","rust_mdbook.html#rules","rust_mdbook.html#setup","rust_mdbook.html#bzlmod","rust_mdbook.html#workspace","rust_mdbook.html#mdbook","rust_mdbook.html#mdbook_server","rust_mdbook.html#mdbook_toolchain","rust_prost.html#rules_rust_prost","rust_prost.html#rules","rust_prost.html#setup","rust_prost.html#rust_prost_library","rust_prost.html#rust_prost_toolchain","rust_prost.html#rust_prost_transform","rust_protobuf.html#rules_rust_protobuf","rust_protobuf.html#setup","rust_protobuf.html#rust_grpc_library","rust_protobuf.html#rust_proto_library","rust_wasm_bindgen.html#rules_rust_wasm_bindgen","rust_wasm_bindgen.html#rules","rust_wasm_bindgen.html#setup","rust_wasm_bindgen.html#interfacing-with-javascript-rules","rust_wasm_bindgen.html#rust_wasm_bindgen","rust_wasm_bindgen.html#rust_wasm_bindgen_toolchain","rust_wasm_bindgen.html#rustwasmbindgeninfo"],"index":{"documentStore":{"docInfo":{"0":{"body":7,"breadcrumbs":3,"title":2},"1":{"body":12,"breadcrumbs":2,"title":1},"10":{"body":5,"breadcrumbs":3,"title":2},"100":{"body":129,"breadcrumbs":2,"title":1},"101":{"body":314,"breadcrumbs":2,"title":1},"102":{"body":9,"breadcrumbs":4,"title":2},"103":{"body":30,"breadcrumbs":6,"title":2},"104":{"body":12,"breadcrumbs":6,"title":2},"105":{"body":32,"breadcrumbs":5,"title":1},"106":{"body":12,"breadcrumbs":5,"title":1},"107":{"body":211,"breadcrumbs":6,"title":2},"108":{"body":117,"breadcrumbs":6,"title":2},"109":{"body":337,"breadcrumbs":6,"title":2},"11":{"body":14,"breadcrumbs":3,"title":1},"110":{"body":159,"breadcrumbs":5,"title":1},"111":{"body":450,"breadcrumbs":5,"title":1},"112":{"body":262,"breadcrumbs":5,"title":1},"113":{"body":253,"breadcrumbs":5,"title":1},"114":{"body":307,"breadcrumbs":5,"title":1},"115":{"body":150,"breadcrumbs":5,"title":1},"116":{"body":46,"breadcrumbs":5,"title":1},"117":{"body":24,"breadcrumbs":6,"title":2},"118":{"body":30,"breadcrumbs":5,"title":1},"119":{"body":2,"breadcrumbs":5,"title":1},"12":{"body":1,"breadcrumbs":3,"title":1},"120":{"body":7,"breadcrumbs":6,"title":2},"121":{"body":24,"breadcrumbs":5,"title":1},"122":{"body":109,"breadcrumbs":6,"title":2},"123":{"body":119,"breadcrumbs":6,"title":2},"124":{"body":146,"breadcrumbs":6,"title":2},"125":{"body":16,"breadcrumbs":6,"title":2},"126":{"body":21,"breadcrumbs":8,"title":4},"127":{"body":74,"breadcrumbs":8,"title":4},"128":{"body":47,"breadcrumbs":8,"title":4},"129":{"body":48,"breadcrumbs":9,"title":5},"13":{"body":809,"breadcrumbs":3,"title":1},"130":{"body":112,"breadcrumbs":5,"title":1},"131":{"body":414,"breadcrumbs":7,"title":3},"132":{"body":383,"breadcrumbs":5,"title":1},"133":{"body":28,"breadcrumbs":5,"title":1},"134":{"body":151,"breadcrumbs":5,"title":1},"135":{"body":33,"breadcrumbs":5,"title":1},"136":{"body":263,"breadcrumbs":5,"title":1},"137":{"body":40,"breadcrumbs":5,"title":1},"138":{"body":185,"breadcrumbs":5,"title":1},"139":{"body":716,"breadcrumbs":7,"title":3},"14":{"body":584,"breadcrumbs":3,"title":1},"140":{"body":36,"breadcrumbs":4,"title":2},"141":{"body":9,"breadcrumbs":2,"title":1},"142":{"body":16,"breadcrumbs":2,"title":1},"143":{"body":51,"breadcrumbs":2,"title":1},"144":{"body":52,"breadcrumbs":2,"title":1},"145":{"body":9,"breadcrumbs":3,"title":1},"146":{"body":3,"breadcrumbs":3,"title":1},"147":{"body":57,"breadcrumbs":3,"title":1},"148":{"body":111,"breadcrumbs":3,"title":1},"149":{"body":128,"breadcrumbs":3,"title":1},"15":{"body":49,"breadcrumbs":3,"title":1},"150":{"body":107,"breadcrumbs":3,"title":1},"151":{"body":3,"breadcrumbs":3,"title":1},"152":{"body":3,"breadcrumbs":3,"title":1},"153":{"body":0,"breadcrumbs":3,"title":1},"154":{"body":4,"breadcrumbs":3,"title":1},"155":{"body":8,"breadcrumbs":3,"title":1},"156":{"body":46,"breadcrumbs":3,"title":1},"157":{"body":50,"breadcrumbs":3,"title":1},"158":{"body":34,"breadcrumbs":3,"title":1},"159":{"body":11,"breadcrumbs":3,"title":1},"16":{"body":487,"breadcrumbs":3,"title":1},"160":{"body":2,"breadcrumbs":3,"title":1},"161":{"body":207,"breadcrumbs":3,"title":1},"162":{"body":30,"breadcrumbs":3,"title":1},"163":{"body":140,"breadcrumbs":3,"title":1},"164":{"body":110,"breadcrumbs":3,"title":1},"165":{"body":11,"breadcrumbs":3,"title":1},"166":{"body":203,"breadcrumbs":3,"title":1},"167":{"body":123,"breadcrumbs":3,"title":1},"168":{"body":120,"breadcrumbs":3,"title":1},"169":{"body":9,"breadcrumbs":3,"title":1},"17":{"body":598,"breadcrumbs":3,"title":1},"170":{"body":2,"breadcrumbs":3,"title":1},"171":{"body":51,"breadcrumbs":3,"title":1},"172":{"body":43,"breadcrumbs":5,"title":3},"173":{"body":91,"breadcrumbs":3,"title":1},"174":{"body":72,"breadcrumbs":3,"title":1},"175":{"body":51,"breadcrumbs":3,"title":1},"18":{"body":533,"breadcrumbs":3,"title":1},"19":{"body":129,"breadcrumbs":3,"title":1},"2":{"body":41,"breadcrumbs":2,"title":1},"20":{"body":683,"breadcrumbs":5,"title":3},"21":{"body":111,"breadcrumbs":3,"title":1},"22":{"body":14,"breadcrumbs":3,"title":1},"23":{"body":48,"breadcrumbs":3,"title":1},"24":{"body":1,"breadcrumbs":3,"title":1},"25":{"body":1,"breadcrumbs":3,"title":1},"26":{"body":74,"breadcrumbs":3,"title":1},"27":{"body":59,"breadcrumbs":3,"title":1},"28":{"body":29,"breadcrumbs":3,"title":1},"29":{"body":85,"breadcrumbs":3,"title":1},"3":{"body":48,"breadcrumbs":2,"title":1},"30":{"body":28,"breadcrumbs":3,"title":1},"31":{"body":1,"breadcrumbs":3,"title":1},"32":{"body":1,"breadcrumbs":3,"title":1},"33":{"body":32,"breadcrumbs":3,"title":1},"34":{"body":63,"breadcrumbs":3,"title":1},"35":{"body":9,"breadcrumbs":3,"title":1},"36":{"body":172,"breadcrumbs":3,"title":1},"37":{"body":119,"breadcrumbs":3,"title":1},"38":{"body":4,"breadcrumbs":3,"title":1},"39":{"body":1,"breadcrumbs":3,"title":1},"4":{"body":66,"breadcrumbs":4,"title":3},"40":{"body":2,"breadcrumbs":3,"title":1},"41":{"body":1,"breadcrumbs":4,"title":2},"42":{"body":100,"breadcrumbs":3,"title":1},"43":{"body":416,"breadcrumbs":3,"title":1},"44":{"body":61,"breadcrumbs":3,"title":1},"45":{"body":309,"breadcrumbs":3,"title":1},"46":{"body":19,"breadcrumbs":3,"title":1},"47":{"body":165,"breadcrumbs":3,"title":1},"48":{"body":1,"breadcrumbs":3,"title":1},"49":{"body":38,"breadcrumbs":3,"title":1},"5":{"body":35,"breadcrumbs":4,"title":3},"50":{"body":7,"breadcrumbs":2,"title":1},"51":{"body":3,"breadcrumbs":5,"title":2},"52":{"body":11,"breadcrumbs":4,"title":1},"53":{"body":13,"breadcrumbs":4,"title":1},"54":{"body":11,"breadcrumbs":4,"title":1},"55":{"body":12,"breadcrumbs":4,"title":1},"56":{"body":29,"breadcrumbs":4,"title":1},"57":{"body":9,"breadcrumbs":4,"title":1},"58":{"body":7,"breadcrumbs":4,"title":1},"59":{"body":55,"breadcrumbs":4,"title":1},"6":{"body":42,"breadcrumbs":3,"title":2},"60":{"body":12,"breadcrumbs":4,"title":1},"61":{"body":16,"breadcrumbs":4,"title":1},"62":{"body":31,"breadcrumbs":4,"title":1},"63":{"body":14,"breadcrumbs":4,"title":1},"64":{"body":14,"breadcrumbs":4,"title":1},"65":{"body":26,"breadcrumbs":4,"title":1},"66":{"body":12,"breadcrumbs":4,"title":1},"67":{"body":27,"breadcrumbs":4,"title":1},"68":{"body":10,"breadcrumbs":4,"title":1},"69":{"body":8,"breadcrumbs":4,"title":1},"7":{"body":38,"breadcrumbs":2,"title":1},"70":{"body":12,"breadcrumbs":4,"title":1},"71":{"body":24,"breadcrumbs":4,"title":1},"72":{"body":31,"breadcrumbs":4,"title":1},"73":{"body":28,"breadcrumbs":4,"title":1},"74":{"body":8,"breadcrumbs":4,"title":1},"75":{"body":12,"breadcrumbs":4,"title":1},"76":{"body":19,"breadcrumbs":4,"title":1},"77":{"body":9,"breadcrumbs":4,"title":1},"78":{"body":1,"breadcrumbs":4,"title":1},"79":{"body":14,"breadcrumbs":4,"title":1},"8":{"body":8,"breadcrumbs":3,"title":2},"80":{"body":3,"breadcrumbs":5,"title":2},"81":{"body":10,"breadcrumbs":4,"title":1},"82":{"body":15,"breadcrumbs":4,"title":1},"83":{"body":10,"breadcrumbs":4,"title":1},"84":{"body":17,"breadcrumbs":4,"title":1},"85":{"body":8,"breadcrumbs":4,"title":1},"86":{"body":3,"breadcrumbs":3,"title":2},"87":{"body":3,"breadcrumbs":2,"title":1},"88":{"body":40,"breadcrumbs":2,"title":1},"89":{"body":556,"breadcrumbs":2,"title":1},"9":{"body":26,"breadcrumbs":4,"title":3},"90":{"body":54,"breadcrumbs":2,"title":1},"91":{"body":6,"breadcrumbs":3,"title":2},"92":{"body":6,"breadcrumbs":2,"title":1},"93":{"body":2,"breadcrumbs":3,"title":2},"94":{"body":7,"breadcrumbs":2,"title":1},"95":{"body":126,"breadcrumbs":2,"title":1},"96":{"body":391,"breadcrumbs":2,"title":1},"97":{"body":19,"breadcrumbs":2,"title":1},"98":{"body":305,"breadcrumbs":2,"title":1},"99":{"body":252,"breadcrumbs":2,"title":1}},"docs":{"0":{"body":"This repository provides rules for building Rust projects with Bazel .","breadcrumbs":"Introduction » Rules Rust","id":"0","title":"Rules Rust"},"1":{"body":"The rules are released, and releases can be found on the GitHub Releases page . We recommend using the latest release from that page.","breadcrumbs":"Introduction » Setup","id":"1","title":"Setup"},"10":{"body":"You can also browse the full API in one page .","breadcrumbs":"Rules » Full API","id":"10","title":"Full API"},"100":{"body":"load(\"@rules_rust//rust:repositories.bzl\", \"rust_toolchain_repository_proxy\") rust_toolchain_repository_proxy(name, exec_compatible_with, repo_mapping, target_compatible_with, target_settings, toolchain, toolchain_type) Generates a toolchain-bearing repository that declares the toolchains from some other rust_toolchain_repository. ATTRIBUTES Name Description Type Mandatory Default name A unique name for this repository. Name required exec_compatible_with A list of constraints for the execution platform for this toolchain. List of strings optional [] repo_mapping In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.For example, an entry \"@foo\": \"@bar\" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target).This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension's implementation function). Dictionary: String -> String optional target_compatible_with A list of constraints for the target platform for this toolchain. List of strings optional [] target_settings A list of config_settings that must be satisfied by the target configuration in order for this toolchain to be selected during toolchain resolution. List of strings optional [] toolchain The name of the toolchain implementation target. String required toolchain_type The toolchain type of the toolchain to declare String required","breadcrumbs":"Repositories » rust_toolchain_repository_proxy","id":"100","title":"rust_toolchain_repository_proxy"},"101":{"body":"load(\"@rules_rust//rust:repositories.bzl\", \"rust_toolchain_tools_repository\") rust_toolchain_tools_repository(name, allocator_library, auth, auth_patterns, dev_components, edition, exec_triple, extra_exec_rustc_flags, extra_rustc_flags, global_allocator_library, netrc, opt_level, repo_mapping, rustfmt_version, sha256s, target_triple, urls, version) Composes a single workspace containing the toolchain components for compiling on a given platform to a series of target platforms. A given instance of this rule should be accompanied by a toolchain_repository_proxy invocation to declare its toolchains to Bazel; the indirection allows separating toolchain selection from toolchain fetching. ATTRIBUTES Name Description Type Mandatory Default name A unique name for this repository. Name required allocator_library Target that provides allocator functions when rust_library targets are embedded in a cc_binary. String optional \"@rules_rust//ffi/cc/allocator_library\" auth Auth object compatible with repository_ctx.download to use when downloading files. See repository_ctx.download for more details. Dictionary: String -> String optional {} auth_patterns A list of patterns to match against urls for which the auth object should be used. List of strings optional [] dev_components Whether to download the rustc-dev components (defaults to False). Requires version to be \"nightly\". Boolean optional False edition The rust edition to be used by default (2015, 2018, or 2021). If absent, every rule is required to specify its edition attribute. String optional \"\" exec_triple The Rust-style target that this compiler runs on String required extra_exec_rustc_flags Extra flags to pass to rustc in exec configuration List of strings optional [] extra_rustc_flags Extra flags to pass to rustc in non-exec configuration List of strings optional [] global_allocator_library Target that provides allocator functions when a global allocator is used with cc_common.link. String optional \"@rules_rust//ffi/cc/global_allocator_library\" netrc .netrc file to use for authentication; mirrors the eponymous attribute from http_archive String optional \"\" opt_level Rustc optimization levels. For more details see the documentation for rust_toolchain.opt_level. Dictionary: String -> String optional {} repo_mapping In WORKSPACE context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.For example, an entry \"@foo\": \"@bar\" declares that, for any time this repository depends on @foo (such as a dependency on @foo//some:target, it should actually resolve that dependency within globally-declared @bar (@bar//some:target).This attribute is not supported in MODULE.bazel context (when invoking a repository rule inside a module extension's implementation function). Dictionary: String -> String optional rustfmt_version The version of the tool among \"nightly\", \"beta\", or an exact version. String optional \"\" sha256s A dict associating tool subdirectories to sha256 hashes. See rust_register_toolchains for more details. Dictionary: String -> String optional {} target_triple The Rust-style target that this compiler builds for. String required urls A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). List of strings optional [\"https://static.rust-lang.org/dist/{}.tar.xz\"] version The version of the tool among \"nightly\", \"beta\", or an exact version. String required","breadcrumbs":"Repositories » rust_toolchain_tools_repository","id":"101","title":"rust_toolchain_tools_repository"},"102":{"body":"crate_universe ( crate_universe bzlmod ) is a tool built into rules_rust that can be used to fetch dependencies.","breadcrumbs":"External Crates » External Dependencies","id":"102","title":"External Dependencies"},"103":{"body":"Crate Universe is a set of Bazel rule for generating Rust targets using Cargo. This doc describes using crate_universe with bzlmod. If you're using a WORKSPACE file, please see the WORKSPACE equivalent of this doc . There are some examples of using crate_universe with bzlmod in the example folder .","breadcrumbs":"External Crates » crate_universe (bzlmod) » Crate Universe","id":"103","title":"Crate Universe"},"104":{"body":"Setup Dependencies Cargo Workspace Direct Packages Vendored Dependencies Crate reference from_cargo from_specs","breadcrumbs":"External Crates » crate_universe (bzlmod) » Table of Contents","id":"104","title":"Table of Contents"},"105":{"body":"To use rules_rust in a project using bzlmod, add the following to your MODULE.bazel file: bazel_dep(name = \"rules_rust\", version = \"0.49.3\") You find the latest version on the release page . After adding rules_rust in your MODULE.bazel, set the following to begin using crate_universe: crate = use_extension(\"@rules_rust//crate_universe:extensions.bzl\", \"crate\")\n// # ... Dependencies\nuse_repo(crate, \"crates\")","breadcrumbs":"External Crates » crate_universe (bzlmod) » Setup","id":"105","title":"Setup"},"106":{"body":"There are three different ways to declare dependencies in your MODULE. Cargo workspace Direct Dependencies Vendored Dependencies","breadcrumbs":"External Crates » crate_universe (bzlmod) » Dependencies","id":"106","title":"Dependencies"},"107":{"body":"One of the simpler ways to wire up dependencies would be to first structure your project into a Cargo workspace. The crates_repository rule can ingest a root Cargo.toml file and generate Bazel dependencies from there. You find a complete example in the in the example folder . crate = use_extension(\"@rules_rust//crate_universe:extensions.bzl\", \"crate\") crate.from_cargo( name = \"crates\", cargo_lockfile = \"//:Cargo.lock\", manifests = [\"//:Cargo.toml\"],\n)\nuse_repo(crate, \"crates\") The generated crates_repository contains helper macros which make collecting dependencies for Bazel targets simpler. Notably, the all_crate_deps and aliases macros ( see Dependencies API ) commonly allow the Cargo.toml files to be the single source of truth for dependencies. Since these macros come from the generated repository, the dependencies and alias definitions they return will automatically update BUILD targets. In your BUILD files, you use these macros for a Rust library as shown below: load(\"@crate_index//:defs.bzl\", \"aliases\", \"all_crate_deps\")\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\", \"rust_test\") rust_library( name = \"lib\", aliases = aliases(), deps = all_crate_deps( normal = True, ), proc_macro_deps = all_crate_deps( proc_macro = True, ),\n) rust_test( name = \"unit_test\", crate = \":lib\", aliases = aliases( normal_dev = True, proc_macro_dev = True, ), deps = all_crate_deps( normal_dev = True, ), proc_macro_deps = all_crate_deps( proc_macro_dev = True, ),\n) For a Rust binary that does not depend on any macro, use the following configuration in your build file: rust_binary( name = \"bin\", srcs = [\"src/main.rs\"], deps = all_crate_deps(normal = True),\n) You have to repin before your first build to ensure all Bazel targets for the macros are generated. Dependency syncing and updating is done in the repository rule which means it's done during the analysis phase of builds. As mentioned in the environments variable table above, the CARGO_BAZEL_REPIN (or REPIN) environment variables can be used to force the rule to update dependencies and potentially render a new lockfile. Given an instance of this repository rule named crates, the easiest way to repin dependencies is to run: CARGO_BAZEL_REPIN=1 bazel sync --only=crates This will result in all dependencies being updated for a project. The CARGO_BAZEL_REPIN environment variable can also be used to customize how dependencies are updated. For more details about repin, please refer to the documentation .","breadcrumbs":"External Crates » crate_universe (bzlmod) » Cargo Workspaces","id":"107","title":"Cargo Workspaces"},"108":{"body":"In cases where Rust targets have heavy interactions with other Bazel targets ( Cc , Proto , etc.), maintaining Cargo.toml files may have diminishing returns as things like rust-analyzer begin to be confused about missing targets or environment variables defined only in Bazel. In situations like this, it may be desirable to have a “Cargo free” setup. You find an example in the in the example folder . crates_repository supports this through the packages attribute, as shown below. crate = use_extension(\"@rules_rust//crate_universe:extensions.bzl\", \"crate\") crate.spec(package = \"serde\", features = [\"derive\"], version = \"1.0\")\ncrate.spec(package = \"serde_json\", version = \"1.0\")\ncrate.spec(package = \"tokio\", default_features = False, features = [\"macros\", \"net\", \"rt-multi-thread\"], version = \"1.38\") crate.from_specs()\nuse_repo(crate, \"crates\") Consuming dependencies may be more ergonomic in this case through the aliases defined in the new repository. In your BUILD files, you use direct dependencies as shown below: rust_binary( name = \"bin\", crate_root = \"src/main.rs\", srcs = glob([ \"src/*.rs\", ]), deps = [ # External crates \"@crates//:serde\", \"@crates//:serde_json\", \"@crates//:tokio\", ], visibility = [\"//visibility:public\"],\n) Notice, direct dependencies do not need repining. Only a cargo workspace needs updating whenever the underlying Cargo.toml file changed.","breadcrumbs":"External Crates » crate_universe (bzlmod) » Direct Dependencies","id":"108","title":"Direct Dependencies"},"109":{"body":"In some cases, it is require that all external dependencies are vendored, meaning downloaded and stored in the workspace. This helps, for example, to conduct licence scans, apply custom patches, or to ensure full build reproducibility since no download error could possibly occur. You find a complete example in the in the example folder . For the setup, you need to add the skylib in addition to the rust rules to your MODUE.bazel. module( name = \"deps_vendored\", version = \"0.0.0\"\n)\n###############################################################################\n# B A Z E L C E N T R A L R E G I S T R Y # https://registry.bazel.build/\n###############################################################################\n# https://github.com/bazelbuild/bazel-skylib/releases/\nbazel_dep(name = \"bazel_skylib\", version = \"1.7.1\") # https://github.com/bazelbuild/rules_rust/releases\nbazel_dep(name = \"rules_rust\", version = \"0.49.3\") ###############################################################################\n# T O O L C H A I N S\n############################################################################### # Rust toolchain\nRUST_EDITION = \"2021\"\nRUST_VERSION = \"1.80.1\" rust = use_extension(\"@rules_rust//rust:extensions.bzl\", \"rust\")\nrust.toolchain( edition = RUST_EDITION, versions = [RUST_VERSION],\n)\nuse_repo(rust, \"rust_toolchains\")\nregister_toolchains(\"@rust_toolchains//:all\") ###############################################################################\n# R U S T C R A T E S\n###############################################################################\ncrate = use_extension(\"@rules_rust//crate_universe:extensions.bzl\", \"crate\") Note, it is important to load the crate_universe rules otherwise you will get an error as the rule set is needed in the vendored target. Assuming you have a package called basic in which you want to vendor dependencies, then you create a folder basic/3rdparty. The folder name can be arbitrary, but by convention, its either thirdparty or 3rdparty to indicate vendored dependencies. In the 3rdparty folder, you add a target crates_vendor to declare your dependencies to vendor. In the example, we vendor a specific version of bzip2. load(\"@rules_rust//crate_universe:defs.bzl\", \"crate\", \"crates_vendor\") crates_vendor( name = \"crates_vendor\", annotations = { \"bzip2-sys\": [crate.annotation( gen_build_script = True, )], }, cargo_lockfile = \"Cargo.Bazel.lock\", generate_build_scripts = False, mode = \"remote\", packages = { \"bzip2\": crate.spec( version = \"=0.3.3\", ), }, repository_name = \"basic\", tags = [\"manual\"],\n) Next, you have to run Cargo build to generate a Cargo.lock file with all resolved dependencies. Then, you rename Cargo.lock to Cargo.Bazel.lock and place it inside the basic/3rdparty folder. At this point, you have the following folder and files: basic |-- 3rdparty | |-- BUILD.bazel | |-- Cargo.Bazel.lock Now you can run the crates_vendor target: bazel run //basic/3rdparty:crates_vendor This generates a crate folders with all configurations for the vendored dependencies. basic |-- 3rdparty | |-- cratea | |-- BUILD.bazel | |-- Cargo.Bazel.lock Suppose you have an application in basic/src that is defined in basic/BUILD.bazel and that depends on a vendored dependency. You find a list of all available vendored dependencies in the BUILD file of the generated folder: basic/3rdparty/crates/BUILD.bazel You declare a vendored dependency in you target as following: load(\"@rules_rust//rust:defs.bzl\", \"rust_binary\") rust_binary( name = \"hello_sys\", srcs = [\"src/main.rs\"], deps = [\"//basic/3rdparty/crates:bzip2\"], visibility = [\"//visibility:public\"],\n) Note, the vendored dependency is not yet accessible because you have to define first how to load the vendored dependencies. For that, you first create a file sys_deps.bzl and add the following content: # rename the default name \"crate_repositories\" in case you import multiple vendored folders.\nload(\"//basic/3rdparty/crates:defs.bzl\", basic_crate_repositories = \"crate_repositories\") def sys_deps(): # Load the vendored dependencies basic_crate_repositories() This is straightforward, you import the generated crate_repositories from the crates folder, rename it to avoid name clashes in case you import from multiple vendored folders, and then just load the vendored dependencies. In a WORKSPACE configuration, you would just load and call sys_deps(), but in a MODULE configuration, you cannot do that. Instead, you create a new file WORKSPACE.bzlmod and add the following content. load(\"//:sys_deps.bzl\", \"sys_deps\")\nsys_deps() Now, you can build the project as usual. There are some more examples of using crate_universe with bzlmod in the example folder .","breadcrumbs":"External Crates » crate_universe (bzlmod) » Vendored Dependencies","id":"109","title":"Vendored Dependencies"},"11":{"body":"Public entry point to all Rust rules and supported APIs. rust_binary rust_library rust_library_group rust_proc_macro rust_shared_library rust_static_library rust_test","breadcrumbs":"Rules » rust » Rules","id":"11","title":"Rules"},"110":{"body":"crate = use_extension(\"@rules_rust//crate_universe:extensions.bzl\", \"crate\")\ncrate.annotation(deps, data, additive_build_file, additive_build_file_content, alias_rule, build_script_data, build_script_data_glob, build_script_deps, build_script_env, build_script_proc_macro_deps, build_script_rundir, build_script_rustc_env, build_script_toolchains, build_script_tools, compile_data, compile_data_glob, crate, crate_features, data_glob, disable_pipelining, extra_aliased_targets, gen_all_binaries, gen_binaries, gen_build_script, override_target_bin, override_target_build_script, override_target_lib, override_target_proc_macro, patch_args, patch_tool, patches, proc_macro_deps, repositories, rustc_env, rustc_env_files, rustc_flags, shallow_since, version)\ncrate.from_cargo(name, cargo_config, cargo_lockfile, generate_binaries, generate_build_scripts, host_tools_repo, isolated, lockfile, manifests, supported_platform_triples)\ncrate.from_specs(name, cargo_config, cargo_lockfile, generate_binaries, generate_build_scripts, host_tools_repo, isolated, lockfile, supported_platform_triples)\ncrate.render_config(build_file_template, crate_alias_template, crate_label_template, crate_repository_template, crates_module_template, default_alias_rule_bzl, default_alias_rule_name, default_package_name, generate_rules_license_metadata, generate_target_compatible_with, platforms_template, regen_command, repositories, vendor_mode)\ncrate.spec(artifact, branch, default_features, features, git, lib, package, repositories, rev, tag, version)\ncrate.splicing_config(repositories, resolver_version) Crate universe module extensions. Environment Variables: variable usage CARGO_BAZEL_GENERATOR_SHA256 The sha256 checksum of the file located at CARGO_BAZEL_GENERATOR_URL CARGO_BAZEL_GENERATOR_URL The URL of a cargo-bazel binary. This variable takes precedence over attributes and can use file:// for local paths CARGO_BAZEL_ISOLATED An authoritative flag as to whether or not the CARGO_HOME environment variable should be isolated from the host configuration CARGO_BAZEL_REPIN An indicator that the dependencies represented by the rule should be regenerated. REPIN may also be used. See Repinning / Updating Dependencies for more details. CARGO_BAZEL_REPIN_ONLY A comma-delimited allowlist for rules to execute repinning. Can be useful if multiple instances of the repository rule are used in a Bazel workspace, but repinning should be limited to one of them. TAG CLASSES","breadcrumbs":"External Crates » crate_universe (bzlmod) » crate","id":"110","title":"crate"},"111":{"body":"A collection of extra attributes and settings for a particular crate. Attributes Name Description Type Mandatory Default deps A list of labels to add to a crate's rust_library::deps attribute. List of strings optional [] data A list of labels to add to a crate's rust_library::data attribute. List of strings optional [] additive_build_file A file containing extra contents to write to the bottom of generated BUILD files. Label optional None additive_build_file_content Extra contents to write to the bottom of generated BUILD files. String optional \"\" alias_rule Alias rule to use instead of native.alias(). Overrides render_config 's 'default_alias_rule'. String optional \"\" build_script_data A list of labels to add to a crate's cargo_build_script::data attribute. List of strings optional [] build_script_data_glob A list of glob patterns to add to a crate's cargo_build_script::data attribute List of strings optional [] build_script_deps A list of labels to add to a crate's cargo_build_script::deps attribute. List of strings optional [] build_script_env Additional environment variables to set on a crate's cargo_build_script::env attribute. Dictionary: String -> String optional {} build_script_proc_macro_deps A list of labels to add to a crate's cargo_build_script::proc_macro_deps attribute. List of strings optional [] build_script_rundir An override for the build script's rundir attribute. String optional \"\" build_script_rustc_env Additional environment variables to set on a crate's cargo_build_script::env attribute. Dictionary: String -> String optional {} build_script_toolchains A list of labels to set on a crates's cargo_build_script::toolchains attribute. List of labels optional [] build_script_tools A list of labels to add to a crate's cargo_build_script::tools attribute. List of strings optional [] compile_data A list of labels to add to a crate's rust_library::compile_data attribute. List of strings optional [] compile_data_glob A list of glob patterns to add to a crate's rust_library::compile_data attribute. List of strings optional [] crate The name of the crate the annotation is applied to String required crate_features A list of strings to add to a crate's rust_library::crate_features attribute. List of strings optional [] data_glob A list of glob patterns to add to a crate's rust_library::data attribute. List of strings optional [] disable_pipelining If True, disables pipelining for library targets for this crate. Boolean optional False extra_aliased_targets A list of targets to add to the generated aliases in the root crate_universe repository. Dictionary: String -> String optional {} gen_all_binaries If true, generates rust_binary targets for all of the crates bins Boolean optional False gen_binaries As a list, the subset of the crate's bins that should get rust_binary targets produced. List of strings optional [] gen_build_script An authoritative flag to determine whether or not to produce cargo_build_script targets for the current crate. Supported values are 'on', 'off', and 'auto'. String optional \"auto\" override_target_bin An optional alternate target to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Label optional None override_target_build_script An optional alternate target to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Label optional None override_target_lib An optional alternate target to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Label optional None override_target_proc_macro An optional alternate target to use when something depends on this crate to allow the parent repo to provide its own version of this dependency. Label optional None patch_args The patch_args attribute of a Bazel repository rule. See http_archive.patch_args List of strings optional [] patch_tool The patch_tool attribute of a Bazel repository rule. See http_archive.patch_tool String optional \"\" patches The patches attribute of a Bazel repository rule. See http_archive.patches List of labels optional [] proc_macro_deps A list of labels to add to a crate's rust_library::proc_macro_deps attribute. List of strings optional [] repositories A list of repository names specified from crate.from_cargo(name=...) that this annotation is applied to. Defaults to all repositories. List of strings optional [] rustc_env Additional variables to set on a crate's rust_library::rustc_env attribute. Dictionary: String -> String optional {} rustc_env_files A list of labels to set on a crate's rust_library::rustc_env_files attribute. List of strings optional [] rustc_flags A list of strings to set on a crate's rust_library::rustc_flags attribute. List of strings optional [] shallow_since An optional timestamp used for crates originating from a git repository instead of a crate registry. This flag optimizes fetching the source code. String optional \"\" version The versions of the crate the annotation is applied to. Defaults to all versions. String optional \"*\"","breadcrumbs":"External Crates » crate_universe (bzlmod) » annotation","id":"111","title":"annotation"},"112":{"body":"Generates a repo @crates from a Cargo.toml / Cargo.lock pair. Attributes Name Description Type Mandatory Default name The name of the repo to generate Name optional \"crates\" cargo_config A Cargo configuration file. Label optional None cargo_lockfile The path to an existing Cargo.lock file Label optional None generate_binaries Whether to generate rust_binary targets for all the binary crates in every package. By default only the rust_library targets are generated. Boolean optional False generate_build_scripts Whether or not to generate cargo build scripts by default. Boolean optional True host_tools_repo The name of the rust_host_tools repository to use. String optional \"rust_host_tools\" isolated If true, CARGO_HOME will be overwritten to a directory within the generated repository in order to prevent other uses of Cargo from impacting having any effect on the generated targets produced by this rule. For users who either have multiple crate_repository definitions in a WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This variable is also controled by CARGO_BAZEL_ISOLATED environment variable. Boolean optional True lockfile The path to a file to use for reproducible renderings. If set, this file must exist within the workspace (but can be empty) before this rule will work. Label optional None manifests A list of Cargo manifests (Cargo.toml files). List of labels optional [] supported_platform_triples A set of all platform triples to consider when generating dependencies. List of strings optional [\"aarch64-apple-darwin\", \"aarch64-apple-ios\", \"aarch64-apple-ios-sim\", \"aarch64-linux-android\", \"aarch64-pc-windows-msvc\", \"aarch64-unknown-fuchsia\", \"aarch64-unknown-linux-gnu\", \"aarch64-unknown-nixos-gnu\", \"aarch64-unknown-nto-qnx710\", \"arm-unknown-linux-gnueabi\", \"armv7-linux-androideabi\", \"armv7-unknown-linux-gnueabi\", \"i686-apple-darwin\", \"i686-linux-android\", \"i686-pc-windows-msvc\", \"i686-unknown-freebsd\", \"i686-unknown-linux-gnu\", \"powerpc-unknown-linux-gnu\", \"riscv32imc-unknown-none-elf\", \"riscv64gc-unknown-none-elf\", \"s390x-unknown-linux-gnu\", \"thumbv7em-none-eabi\", \"thumbv8m.main-none-eabi\", \"wasm32-unknown-unknown\", \"wasm32-wasip1\", \"x86_64-apple-darwin\", \"x86_64-apple-ios\", \"x86_64-linux-android\", \"x86_64-pc-windows-msvc\", \"x86_64-unknown-freebsd\", \"x86_64-unknown-fuchsia\", \"x86_64-unknown-linux-gnu\", \"x86_64-unknown-nixos-gnu\", \"x86_64-unknown-none\"]","breadcrumbs":"External Crates » crate_universe (bzlmod) » from_cargo","id":"112","title":"from_cargo"},"113":{"body":"Generates a repo @crates from the defined spec tags. Attributes Name Description Type Mandatory Default name The name of the repo to generate. Name optional \"crates\" cargo_config A Cargo configuration file. Label optional None cargo_lockfile The path to an existing Cargo.lock file Label optional None generate_binaries Whether to generate rust_binary targets for all the binary crates in every package. By default only the rust_library targets are generated. Boolean optional False generate_build_scripts Whether or not to generate cargo build scripts by default. Boolean optional True host_tools_repo The name of the rust_host_tools repository to use. String optional \"rust_host_tools\" isolated If true, CARGO_HOME will be overwritten to a directory within the generated repository in order to prevent other uses of Cargo from impacting having any effect on the generated targets produced by this rule. For users who either have multiple crate_repository definitions in a WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This variable is also controled by CARGO_BAZEL_ISOLATED environment variable. Boolean optional True lockfile The path to a file to use for reproducible renderings. If set, this file must exist within the workspace (but can be empty) before this rule will work. Label optional None supported_platform_triples A set of all platform triples to consider when generating dependencies. List of strings optional [\"aarch64-apple-darwin\", \"aarch64-apple-ios\", \"aarch64-apple-ios-sim\", \"aarch64-linux-android\", \"aarch64-pc-windows-msvc\", \"aarch64-unknown-fuchsia\", \"aarch64-unknown-linux-gnu\", \"aarch64-unknown-nixos-gnu\", \"aarch64-unknown-nto-qnx710\", \"arm-unknown-linux-gnueabi\", \"armv7-linux-androideabi\", \"armv7-unknown-linux-gnueabi\", \"i686-apple-darwin\", \"i686-linux-android\", \"i686-pc-windows-msvc\", \"i686-unknown-freebsd\", \"i686-unknown-linux-gnu\", \"powerpc-unknown-linux-gnu\", \"riscv32imc-unknown-none-elf\", \"riscv64gc-unknown-none-elf\", \"s390x-unknown-linux-gnu\", \"thumbv7em-none-eabi\", \"thumbv8m.main-none-eabi\", \"wasm32-unknown-unknown\", \"wasm32-wasip1\", \"x86_64-apple-darwin\", \"x86_64-apple-ios\", \"x86_64-linux-android\", \"x86_64-pc-windows-msvc\", \"x86_64-unknown-freebsd\", \"x86_64-unknown-fuchsia\", \"x86_64-unknown-linux-gnu\", \"x86_64-unknown-nixos-gnu\", \"x86_64-unknown-none\"]","breadcrumbs":"External Crates » crate_universe (bzlmod) » from_specs","id":"113","title":"from_specs"},"114":{"body":"Various settings used to configure rendered outputs. The template parameters each support a select number of format keys. A description of each key can be found below where the supported keys for each template can be found in the parameter docs key definition name The name of the crate. Eg tokio repository The rendered repository name for the crate. Directly relates to crate_repository_template. triple A platform triple. Eg x86_64-unknown-linux-gnu version The crate version. Eg 1.2.3 target The library or binary target of the crate file The basename of a file Attributes Name Description Type Mandatory Default build_file_template The base template to use for BUILD file names. The available format keys are [{name}, {version}`]. String optional \"//:BUILD.{name}-{version}.bazel\" crate_alias_template The base template to use for crate labels. The available format keys are [{repository}, {name}, {version}, {target}]. String optional \"@{repository}//:{name}-{version}-{target}\" crate_label_template The base template to use for crate labels. The available format keys are [{repository}, {name}, {version}, {target}]. String optional \"@{repository}__{name}-{version}//:{target}\" crate_repository_template The base template to use for Crate label repository names. The available format keys are [{repository}, {name}, {version}]. String optional \"{repository}__{name}-{version}\" crates_module_template The pattern to use for the defs.bzl and BUILD.bazel file names used for the crates module. The available format keys are [{file}]. String optional \"//:{file}\" default_alias_rule_bzl Alias rule to use when generating aliases for all crates. Acceptable values are 'alias', 'dbg'/'fastbuild'/'opt' (transitions each crate's compilation_mode) or a string representing a rule in the form '