@@ -484,9 +484,14 @@ def produce_tool_path(tool_name, target_triple, version):
484
484
def load_arbitrary_tool (ctx , tool_name , tool_subdirectories , version , iso_date , target_triple , sha256 = "" ):
485
485
"""Loads a Rust tool, downloads, and extracts into the common workspace.
486
486
487
- This function sources the tool from the Rust-lang static file server. The index is available
488
- at: https://static.rust-lang.org/dist/index.html (or the path specified by
489
- "${STATIC_RUST_URL}/dist/index.html" if the STATIC_RUST_URL envinronment variable is set).
487
+ This function sources the tool from the Rust-lang static file server. The index is available at:
488
+ - https://static.rust-lang.org/dist/channel-rust-stable.toml
489
+ - https://static.rust-lang.org/dist/channel-rust-beta.toml
490
+ - https://static.rust-lang.org/dist/channel-rust-nightly.toml
491
+
492
+ The environment variable `STATIC_RUST_URL` can be used to replace the schema and hostname of
493
+ the URLs used for fetching assets. `https://static.rust-lang.org/dist/channel-rust-stable.toml`
494
+ becomes `${STATIC_RUST_URL}/dist/channel-rust-stable.toml`
490
495
491
496
Args:
492
497
ctx (repository_ctx): A repository_ctx (no attrs required).
@@ -511,7 +516,7 @@ def load_arbitrary_tool(ctx, tool_name, tool_subdirectories, version, iso_date,
511
516
512
517
check_version_valid (version , iso_date , param_prefix = tool_name + "_" )
513
518
514
- # N.B. See https://static.rust-lang.org/dist/index.html to find the tool_suburl for a given
519
+ # View the indices mentioned in the docstring to find the tool_suburl for a given
515
520
# tool.
516
521
tool_suburl = produce_tool_suburl (tool_name , target_triple , version , iso_date )
517
522
static_rust = ctx .os .environ .get ("STATIC_RUST_URL" , "https://static.rust-lang.org" )
0 commit comments