nandi/jolt-nativepublic Fork 0
8cf1b3347ef6fa83297b6866dfd47d2728d4e339
Commits
Clone
git clone https://git.rickub.com/nandi/jolt-native.git
git clone ssh://git@rickub.com/nandi/jolt-native.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Fetch rustc the way buck can ship it, from what DotSlash already pins 8cf1b33 · on 8cf1b3347ef6fa83297b6866dfd47d2728d4e339 · nandi · 19d ago
dist.bzl · 33 lines · 1.4 KBPython Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# The compilers, as build artifacts rather than things found on the machine.
#
# scripts/*.dotslash is where a tool's version and digest are written down, and
# it stays that way: generated.bzl beside this file is derived from those
# manifests by scripts/dotslash-to-buck, so there is one place to bump a
# version and no second copy of a digest to drift.
#
# buck cannot use the shims themselves. DotSlash resolves a tool at run time,
# on the machine running it, against a cache in the user's home — so the tool
# is not an input to any action, is not in any action's cache digest, and is
# not something a remote worker can be handed. Fetching the identical archive
# by the identical digest is how buck gets those three properties without
# taking the pinning away from DotSlash.
load("//dist:generated.bzl", "DIST")

def _archive(name, tool, platform):
    entry = DIST[tool][platform]
    native.http_archive(
        name = name,
        urls = [entry["url"]],
        sha256 = entry["sha256"],
        strip_prefix = entry["strip_prefix"],
        type = entry["type"],
        visibility = ["PUBLIC"],
    )

def rust_dist(name, platform):
    """The Rust dist tarball: rustc, rustdoc and the std components."""
    _archive(name, "rust", platform)

def zig_dist(name, platform):
    """zig, which is the C and C++ compiler, the linker and the archiver."""
    _archive(name, "zig", platform)