The build image cross-builds releases; pinned d2d24c22 85ad9087a566
Rust targets for Windows, Linux arm64 and riscv64 and macOS, zig 0.16.0
(checked against its SHA-256), cargo-zigbuild 0.23.4 and MinGW, with
zip, so scripts/dist.sh runs in a job (oxygen#59). Rebuilt with the
hub's new crates (lzma-rs, flate2, md-5, globset, sha2).
refs oxygen#59
Author Andy McCall @andymccall <[email protected] >
When 1 month ago · 2026-10-02 20:51 UTC
Signature ✔ signed by Andy McCall
Hash 85ad9087a566045953883451cd50cda02dfe2831a006414de27d102f5a42edfc
Depends on eb5c4db673e5 f29b88af0d9b f849c7889471 fe128fa67a06
Depended on by 5544c8998aa7 28cc603f737d fad6152112b1 eba8bdd7ad5a
In bookmarks main newer-pipeline push-uses-login
In tags v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.5.0 v0.5.1 v0.5.2 v0.5.3
Edits 8 atoms, 0 tree operations, 4 files
Browse the tree at this change
.flow/pipeline.kdl images/rust/Dockerfile images/rust/README.md images/rust/build.sh
modified
.flow/pipeline.kdl
+2 −2
…
36 unchanged lines
37
37
// vendored crates. oxygen comes from the pinned subrepo in deps/.
38
38
sandbox "rust" {
39
39
runtime "microvm"
40
-
rootfs "cas://blob/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e "
40
+
rootfs "cas://blob/d2d24c2211f00d6ccf89fbee63095ad2a81d0cc9af92d7a0ede9129e18d46e91 "
41
41
memory-limit "8GiB"
42
42
cpu-limit 4
43
43
network "loopback"
…
1 unchanged lines
45
45
46
46
sandbox "rust-small" {
47
47
runtime "microvm"
48
-
rootfs "cas://blob/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e "
48
+
rootfs "cas://blob/d2d24c2211f00d6ccf89fbee63095ad2a81d0cc9af92d7a0ede9129e18d46e91 "
49
49
memory-limit "1GiB"
50
50
cpu-limit 1
51
51
network "isolated"
…
44 unchanged lines
modified
images/rust/Dockerfile
+20 −0
…
13 unchanged lines
14
14
RUN tc=$(ls -d /usr/local/rustup/toolchains/*/ | head -1) \
15
15
&& for b in cargo rustc rustdoc cargo-fmt rustfmt cargo-clippy clippy-driver; do ln -sf "$tc/bin/$b" /usr/local/bin/$b; done
16
16
17
+
# Release builds (oxygen#59, oxygenhub#85): each project's scripts/dist.sh
18
+
# cross-builds Linux x86_64, arm64 and riscv64, macOS and Windows, with
19
+
# cargo-zigbuild and zig (no Apple SDK needed) and MinGW, and packs .deb,
20
+
# .tar.gz and .zip. The rustup targets' standard libraries, zig checked
21
+
# against its published SHA-256, and cargo-zigbuild, all linked onto the
22
+
# guest's fixed PATH.
23
+
ARG ZIG_VERSION
24
+
ARG ZIG_SHA256
25
+
RUN rustup target add x86_64-pc-windows-gnu aarch64-unknown-linux-gnu riscv64gc-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin \
26
+
&& apt-get update \
27
+
&& apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64 zip \
28
+
&& rm -rf /var/lib/apt/lists/*
29
+
ADD https://ziglang.org/download/${ZIG_VERSION}/zig-x86_64-linux-${ZIG_VERSION}.tar.xz /tmp/zig.tar.xz
30
+
RUN echo "${ZIG_SHA256} /tmp/zig.tar.xz" | sha256sum -c - \
31
+
&& mkdir -p /opt/zig && tar -xJf /tmp/zig.tar.xz -C /opt/zig --strip-components=1 && rm /tmp/zig.tar.xz \
32
+
&& ln -sf /opt/zig/zig /usr/local/bin/zig \
33
+
&& cargo install --locked --version 0.23.4 --root /opt/cargo-zigbuild cargo-zigbuild \
34
+
&& ln -sf /opt/cargo-zigbuild/bin/cargo-zigbuild /usr/local/bin/cargo-zigbuild \
35
+
&& rm -rf /usr/local/cargo/registry /usr/local/cargo/git
36
+
17
37
ARG NODE_VERSION
18
38
ARG NODE_SHA256
19
39
ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz /tmp/node.tar.xz
…
31 unchanged lines
modified
images/rust/README.md
+1 −0
…
4 unchanged lines
5
5
- Rust 1.97.1 with rustfmt and clippy.
6
6
- Node 24.21.0, checked against its published SHA-256.
7
7
- git, make and pkg-config.
8
+
- Release cross-building: the Windows, Linux arm64 and riscv64, and macOS targets, zig 0.16.0 (checked against its SHA-256), cargo-zigbuild and MinGW, with zip, so `scripts/dist.sh` runs in a job.
8
9
- Every crate that oxygen, oxygenhub and oxygenflow use, vendored in `/opt/vendor`.
9
10
10
11
OxygenFlow jobs have no network (`network "isolated"`). So cargo is pointed at the vendored crates by `/.cargo/config.toml`, which cargo reads for any directory under `/`, including `/src`. `CARGO_HOME` stays at its default, `$HOME/.cargo`, which is under `/tmp` and writable. The toolchain's binaries are linked into `/usr/local/bin`, because the guest's `PATH` is fixed and nothing at run time needs rustup.
…
41 unchanged lines
modified
images/rust/build.sh
+4 −1
…
8 unchanged lines
9
9
out=${1:-$here/oxygenflow-build.tar}
10
10
NODE_VERSION=24.21.0
11
11
NODE_SHA256=fd8e59d5a511510f6a298afb548f18c7d2b1be404d8b4a27d94fbe49f56cb2d6
12
+
ZIG_VERSION=0.16.0
13
+
ZIG_SHA256=70e49664a74374b48b51e6f3fdfbf437f6395d42509050588bd49abe52ba3d00
12
14
13
15
rm -rf "$here/vendor"
14
16
cargo vendor --locked --versioned-dirs \
…
17 unchanged lines
32
34
python3 "$here/recipe.py" "$dev/$ws" "$here/warm/$ws"
33
35
done
34
36
docker build -q -t oxygenflow-build \
35
-
--build-arg NODE_VERSION=$NODE_VERSION --build-arg NODE_SHA256=$NODE_SHA256 "$here"
37
+
--build-arg NODE_VERSION=$NODE_VERSION --build-arg NODE_SHA256=$NODE_SHA256 \
38
+
--build-arg ZIG_VERSION=$ZIG_VERSION --build-arg ZIG_SHA256=$ZIG_SHA256 "$here"
36
39
id=$(docker create oxygenflow-build)
37
40
docker export "$id" -o "$out"
38
41
docker rm "$id" >/dev/null
…
2 unchanged lines