# The compilers, as build artifacts rather than things found on the machine. # # scripts/*.dotslash pins the same tarballs for humans; these fetch them into # buck's own tree so that every action's inputs include the compiler that ran # it. Two things follow. An action's cache digest now covers the toolchain, so # a compiler change can no longer collide with the old entries — the failure # that produced E0514 "please recompile that crate" against a shared cache. # And a remote worker can materialise the tools, which is what remote # execution needs and what a host path can never give it. # # Keep the versions and digests here equal to the ones in scripts/. RUST_VERSION = "1.98.0" RUST_DATE = "2026-08-20" ZIG_VERSION = "0.16.0" _RUST_DIST = { "x86_64-unknown-linux-gnu": "aa30409afa67bd1ada244cefd82c7980e6a65bc113bb978e934b2413c75e3900", "aarch64-unknown-linux-gnu": "5fbb4282403046d52a4672765c6761a809bf9f33e699b17e6eb7a93ab7770cc3", } _ZIG_DIST = { "x86_64-linux": "70e49664a74374b48b51e6f3fdfbf437f6395d42509050588bd49abe52ba3d00", "aarch64-linux": "ea4b09bfb22ec6f6c6ceac57ab63efb6b46e17ab08d21f69f3a48b38e1534f17", } def rust_dist(name, triple): """The whole Rust dist tarball: rustc, rustdoc, cargo and the std components.""" native.http_archive( name = name, urls = ["https://static.rust-lang.org/dist/{}/rust-{}-{}.tar.gz".format( RUST_DATE, RUST_VERSION, triple, )], sha256 = _RUST_DIST[triple], strip_prefix = "rust-{}-{}".format(RUST_VERSION, triple), type = "tar.gz", visibility = ["PUBLIC"], ) def zig_dist(name, triple): """zig, which is the C and C++ compiler, the linker and the archiver.""" native.http_archive( name = name, urls = ["https://ziglang.org/download/{}/zig-{}-{}.tar.xz".format( ZIG_VERSION, triple, ZIG_VERSION, )], sha256 = _ZIG_DIST[triple], strip_prefix = "zig-{}-{}".format(triple, ZIG_VERSION), type = "tar.xz", visibility = ["PUBLIC"], )