{"record":{"id":"d9200fb4c4c9016c","repo":"rust-lang/rust","slug":"src-stage0-doesn-t-contain-a-checksum-for-pre","errorCode":null,"errorMessage":"src/stage0 doesn't contain a checksum for {}. Pre-built artifacts might not be available for this target at this time, see https://doc.rust-lang.org/nightly/rustc/platform-support.html for more information.","messagePattern":"src/stage0 doesn't contain a checksum for (.+?)\\. Pre-built artifacts might not be available for this target at this time, see https://doc\\.rust-lang\\.org/nightly/rustc/platform-support\\.html for more information\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"src/bootstrap/bootstrap.py","lineNumber":58,"sourceCode":"            return cpus\n    try:\n        return cpu_count()\n    except NotImplementedError:\n        return 1\n\n\ndef eprint(*args, **kwargs):\n    kwargs[\"file\"] = sys.stderr\n    print(*args, **kwargs)\n\n\ndef get(base, url, path, checksums, verbose=0):\n    with tempfile.NamedTemporaryFile(delete=False) as temp_file:\n        temp_path = temp_file.name\n\n    try:\n        if url not in checksums:\n            raise RuntimeError(\n                (\n                    \"src/stage0 doesn't contain a checksum for {}. \"\n                    \"Pre-built artifacts might not be available for this \"\n                    \"target at this time, see https://doc.rust-lang.org/nightly\"\n                    \"/rustc/platform-support.html for more information.\"\n                ).format(url)\n            )\n        sha256 = checksums[url]\n        if os.path.exists(path):\n            if verify(path, sha256, False):\n                if verbose > 0:\n                    eprint(\"using already-download file\", path)\n                return\n            else:\n                if verbose > 0:\n                    eprint(\n                        \"ignoring already-download file\",\n                        path,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/bootstrap/bootstrap.py#L40-L76","documentation":"Raised by the get() function in bootstrap.py at line 58 when downloading a stage0 pre-built artifact. The function checks if the requested URL exists as a key in the checksums dict (parsed from src/stage0). If the URL is absent, Rust's bootstrap has no known checksum and therefore no pre-built binary for that artifact, so it refuses to download an unverified file. The message links to the platform-support page listing which targets have pre-built artifacts.","triggerScenarios":"get(base, url, path, checksums, verbose) is called during download_toolchain() for a stage0 component. At line 57, 'if url not in checksums' is true. This occurs when the build target triple (host or target) has no entry in src/stage0 for the current nightly, meaning no pre-built rustc/cargo/std component exists for that platform.","commonSituations":"Building Rust from source for a target triple that is Tier 2/Tier 3 without pre-built nightly artifacts (e.g. uncommon embedded or bare-metal targets); a stale or misformatted src/stage0 file; building a very new target whose artifacts haven't been published yet; or using a local fork of the repo with a modified stage0 that's missing entries.","solutions":["Check https://doc.rust-lang.org/nightly/rustc/platform-support.html to confirm whether pre-built artifacts exist for your target.","If the target is unsupported for pre-builds, provide a stage0 compiler manually (set build.rustc and build.cargo in config.toml to local binaries).","Update src/stage0 from the upstream rust-lang/rust repository to get the latest checksum entries.","Build for a supported host triple first, then cross-compile to the desired target."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Before calling get(), check that the URL exists in the checksums dict.\ndef safe_get(base, url, path, checksums, verbose=0):\n    if url not in checksums:\n        print(f'WARNING: no pre-built artifact for {url}. Skipping.')\n        return None\n    get(base, url, path, checksums, verbose)","typeGuard":null,"tryCatchPattern":"try:\n    get(base, url, path, checksums, verbose)\nexcept RuntimeError as e:\n    if 'does not contain a checksum' in str(e):\n        # No pre-built artifact for this target\n        print(f'No stage0 artifact for {url}. Provide build.cargo/build.rustc manually.')\n    raise","preventionTips":["Verify platform support at https://doc.rust-lang.org/nightly/rustc/platform-support.html before building for a new target.","Keep src/stage0 up to date with the upstream repository.","For unsupported targets, provide build.rustc and build.cargo in config.toml pointing to local toolchains."],"tags":["bootstrap","rustc","stage0","checksum","platform-support","python"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}