Skip to content
Closed
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e189a09
build: add Rust to CI docker image, cross-compile targets
kwvg Jan 12, 2026
01fd416
build: add minimal stub crate to validate Rust integration
kwvg Jan 16, 2026
fc23f36
lint: exclude `rust/` from linters
kwvg Feb 28, 2026
57c75bf
build: introduce barebones Autotools integration with Rust
kwvg Jan 24, 2026
2c640ab
build: propagate SDK version to Rust compiler
kwvg Jan 15, 2026
d5cc457
build: propagate macOS SDK path to Rust compiler
kwvg Jan 18, 2026
bc820fc
build: use debug profile for Rust components if `--enable-debug` set
kwvg Jan 16, 2026
d546501
build: propagate target build variables to Rust components
kwvg Jan 17, 2026
1190de3
build: propagate host build variables to Rust components
kwvg Jan 22, 2026
0c91bbb
debug: Add log that validates successful FFI invocation at init
kwvg Jan 15, 2026
5353138
depends: integrate Rust and `cxxbridge` into depends
kwvg Jan 17, 2026
8e74d07
build: drop Rust from CI docker image
kwvg Jan 12, 2026
e53ac71
depends: add support for vendored crates for offline builds
kwvg Feb 21, 2026
fb32452
fix: avoid triggering `rustup` if building from depends
kwvg Jan 16, 2026
e152249
fix: workaround `Directory renamed before its status could be extracted`
kwvg Jan 16, 2026
9c88a95
fix: copy native binaries for access within Guix context
kwvg Jan 17, 2026
a1a681b
fix: patch loader paths to Guix store locations
kwvg Jan 22, 2026
42e20d9
refactor: split rust runner (builder) and standard library (cross)
kwvg Jan 18, 2026
a8016ed
build: switch to Rust 1.85.1, use musl stdlib to avoid Guix glibc issues
kwvg Jan 18, 2026
dedefdd
fix: resolve issues with dist builds
kwvg Jan 24, 2026
a48f5c4
build: aggregate Rust components via umbrella crate instead of ar-mer…
PastaPastaPasta Aug 7, 2026
aed498f
build: bump pinned Rust toolchain from 1.85.1 to 1.92.0
PastaPastaPasta Aug 7, 2026
8258d25
build: write cargo config and sentinels to builddir, not srcdir
PastaPastaPasta Aug 7, 2026
e94961c
build: support git-sourced crates in offline vendored builds
PastaPastaPasta Aug 7, 2026
6e28684
build: make Rust integration optional and CI-covered
PastaPastaPasta Aug 11, 2026
fef0b06
build: harden optional Rust integration
PastaPastaPasta Aug 11, 2026
29add8a
build: distribute Rust vendor helper
PastaPastaPasta Aug 11, 2026
61f9b77
build: validate offline Rust vendor sources
PastaPastaPasta Aug 11, 2026
4037a02
build: complete Rust toolchain validation
PastaPastaPasta Aug 11, 2026
25ff38d
build: populate Rust source cache
PastaPastaPasta Aug 11, 2026
fc2c792
ci: align Rust source cache consumers
PastaPastaPasta Aug 11, 2026
83a6aeb
build: validate Rust toolchain selection
PastaPastaPasta Aug 11, 2026
a0bf590
ci: provide vendored crates to Rust source builds
PastaPastaPasta Aug 11, 2026
2fdf0b8
build: support canonical ARMv7 Rust targets
PastaPastaPasta Aug 11, 2026
6b62e30
build: reject stale generated Rust bridges
PastaPastaPasta Aug 11, 2026
7900d20
build: preserve system Rust toolchain selection
PastaPastaPasta Aug 11, 2026
9ad0760
build: preserve native musl Rust targets
PastaPastaPasta Aug 11, 2026
d05aa50
build: preserve native Rust host ABI
PastaPastaPasta Aug 11, 2026
c594dda
build: harden Rust source provenance
PastaPastaPasta Aug 11, 2026
88d0e2f
fix: require matching bridge generator stamp
PastaPastaPasta Aug 11, 2026
043706d
fix: preserve ARM Rust floating-point ABI
PastaPastaPasta Aug 11, 2026
cb4e8fa
fix: support Rust on 32-bit Linux
PastaPastaPasta Aug 11, 2026
1427f5b
ci: isolate Guix source cache
PastaPastaPasta Aug 11, 2026
93325c0
fix: provision soft-float ARM Rust stdlib
PastaPastaPasta Aug 11, 2026
cbf098b
fix: reject unsupported Rust stdlib targets
PastaPastaPasta Aug 11, 2026
3bf1f79
fix: preserve system PowerPC Rust ABI
PastaPastaPasta Aug 11, 2026
1bbef7d
fix: make Rust vendor setup retryable
PastaPastaPasta Aug 11, 2026
0afa9e4
fix: preserve developer Cargo configuration
PastaPastaPasta Aug 11, 2026
f5ebb59
build: require matching Cargo toolchain
PastaPastaPasta Aug 11, 2026
fbff015
build: hash external depends recipe helpers
PastaPastaPasta Aug 11, 2026
9c94e2c
build: scope Rust helper cache invalidation
PastaPastaPasta Aug 11, 2026
684495e
build: fix cxxbridge updater fetch guidance
PastaPastaPasta Aug 11, 2026
9fa7a39
build: synchronize Rust updater version pins
PastaPastaPasta Aug 11, 2026
f8fde51
build: make cxxbridge updater self-contained
PastaPastaPasta Aug 11, 2026
a0cee68
build: avoid partial cxxbridge updater changes
PastaPastaPasta Aug 11, 2026
4b2ec38
build: confine Rust support to validated hosts
PastaPastaPasta Aug 12, 2026
594f394
fix: match Rust macOS deployment target to the C++ toolchain
PastaPastaPasta Aug 12, 2026
eeb3b91
build: dist the cxxbridge stamp before generated sources
PastaPastaPasta Aug 12, 2026
ecafbb8
build: accept equal-mtime cxxbridge artifacts from source tarballs
PastaPastaPasta Aug 17, 2026
480126c
docs: describe the optional Rust build support
PastaPastaPasta Aug 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .cargo/config.toml.offline
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Linux
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"

[target.armv7-unknown-linux-musleabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.powerpc64le-unknown-linux-musl]
linker = "powerpc64le-linux-gnu-gcc"

[target.riscv64gc-unknown-linux-musl]
linker = "riscv64-linux-gnu-gcc"

[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-gnu-gcc"

# Windows
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"

# macOS
# [target.aarch64-apple-darwin]
# linker = "aarch64-apple-darwin-gcc"

# [target.x86_64-apple-darwin]
# linker = "x86_64-apple-darwin-gcc"

[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
# The directory for this source is set to RUST_VENDORED_SOURCES by rust/Makefile.am
33 changes: 31 additions & 2 deletions .github/workflows/build-depends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
description: "Short hash of the CI base image manifest for cache busting"
required: true
type: string
rust-vendor-artifact:
description: "Artifact holding freshly generated Rust vendor archives"
required: false
type: string
default: ""
runs-on:
description: "Runner label to use (e.g., ubuntu-24.04 or ubuntu-24.04-arm)"
required: true
Expand Down Expand Up @@ -141,8 +146,32 @@ jobs:
uses: actions/cache/restore@v5
with:
path: depends/sources
key: depends-sources-${{ hashFiles('depends/packages/*') }}
restore-keys: depends-sources-
key: depends-sources-v2-${{ hashFiles('depends/packages/*', 'depends/patches/native_cxxbridge/Cargo.lock', 'Cargo.lock') }}
restore-keys: depends-sources-v2-

- name: Restore Rust vendor sources
id: rust-vendor-cache
if: inputs.build-target == 'linux64_rust'
uses: actions/cache/restore@v5
with:
path: |
depends/sources/native_cxxbridge-*-vendored.tar.gz
depends/sources/vendored-crates-*.tar.gz
key: depends-rust-vendor-sources-${{ hashFiles('depends/Makefile', 'depends/funcs.mk', 'depends/packages/native_cxxbridge.mk', 'depends/packages/native_rust.mk', 'depends/patches/native_cxxbridge/Cargo.lock', 'Cargo.lock') }}

- name: Download Rust vendor sources
if: inputs.build-target == 'linux64_rust' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ inputs.rust-vendor-artifact }}
path: depends/sources

- name: Check Rust vendor sources are present
if: inputs.build-target == 'linux64_rust' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact == ''
run: |
echo "::error::Rust vendor source cache missed and no same-run artifact was provided"
exit 1
shell: bash

- name: Restore SDKs cache
id: sdk-cache
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/build-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ on:
required: false
type: string
default: ""
rust-vendor-artifact:
description: "Artifact holding freshly generated Rust vendor archives"
required: false
type: string
default: ""
sdk-artifact:
description: "Artifact holding prepared SDKs, used if the cache restore misses"
required: false
Expand Down Expand Up @@ -97,6 +102,30 @@ jobs:
exit 1
shell: bash

- name: Restore Rust vendor sources
id: rust-vendor-cache
if: inputs.build-target == 'linux64_rust'
uses: actions/cache/restore@v5
with:
path: |
depends/sources/native_cxxbridge-*-vendored.tar.gz
depends/sources/vendored-crates-*.tar.gz
key: depends-rust-vendor-sources-${{ hashFiles('depends/Makefile', 'depends/funcs.mk', 'depends/packages/native_cxxbridge.mk', 'depends/packages/native_rust.mk', 'depends/patches/native_cxxbridge/Cargo.lock', 'Cargo.lock') }}

- name: Download Rust vendor sources
if: inputs.build-target == 'linux64_rust' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact != ''
uses: actions/download-artifact@v8
with:
name: ${{ inputs.rust-vendor-artifact }}
path: depends/sources

- name: Check Rust vendor sources are present
if: inputs.build-target == 'linux64_rust' && steps.rust-vendor-cache.outputs.cache-hit != 'true' && inputs.rust-vendor-artifact == ''
run: |
echo "::error::Rust vendor source cache missed and no same-run artifact was provided"
exit 1
shell: bash

- name: Restore depends cache
id: depends-cache
uses: actions/cache/restore@v5
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ jobs:
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

depends-linux64_rust:
name: x86_64-pc-linux-gnu_rust
uses: ./.github/workflows/build-depends.yml
needs: [check-skip, container, cache-sources]
if: ${{ vars.SKIP_LINUX64_RUST == '' }}
with:
build-target: linux64_rust
container-path: ${{ needs.container.outputs.path }}
base-image-digest: ${{ needs.check-skip.outputs.base-image-digest }}
rust-vendor-artifact: ${{ needs.cache-sources.outputs.rust-vendor-artifact }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

depends-linux64_multiprocess:
name: linux64_multiprocess
uses: ./.github/workflows/build-depends.yml
Expand Down Expand Up @@ -222,6 +234,21 @@ jobs:
depends-artifact: ${{ needs.depends-linux64.outputs.built-artifact }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

src-linux64_rust:
name: linux64_rust-build
uses: ./.github/workflows/build-src.yml
needs: [check-skip, container, cache-sources, depends-linux64_rust]
if: ${{ vars.SKIP_LINUX64_RUST == '' }}
with:
build-target: linux64_rust
container-path: ${{ needs.container.outputs.path }}
depends-key: ${{ needs.depends-linux64_rust.outputs.key }}
depends-host: ${{ needs.depends-linux64_rust.outputs.host }}
depends-dep-opts: ${{ needs.depends-linux64_rust.outputs.dep-opts }}
depends-artifact: ${{ needs.depends-linux64_rust.outputs.built-artifact }}
rust-vendor-artifact: ${{ needs.cache-sources.outputs.rust-vendor-artifact }}
runs-on: ${{ needs.check-skip.outputs['runner-amd64'] }}

src-linux64_asan:
name: linux64_asan-build
uses: ./.github/workflows/build-src.yml
Expand Down
47 changes: 43 additions & 4 deletions .github/workflows/cache-depends-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
required: false
type: string
default: ubuntu-24.04-arm
outputs:
rust-vendor-artifact:
description: "Artifact holding freshly generated Rust vendor archives"
value: ${{ jobs.cache-sources.outputs.rust-vendor-artifact }}
schedule:
# Run daily at 6 AM UTC on the default branch to keep cache warm
- cron: '0 6 * * *'
Expand All @@ -18,6 +22,8 @@ jobs:
# Intentionally keep scheduled cache warming on GitHub-hosted ARM runners.
# Blacksmith caches are expected to persist long enough without a warmup cron.
runs-on: ${{ inputs.runs-on || 'ubuntu-24.04-arm' }}
outputs:
rust-vendor-artifact: ${{ steps.vendor-artifact.outputs.name }}
steps:
- name: Checkout code
uses: actions/checkout@v6
Expand All @@ -31,10 +37,43 @@ jobs:
uses: actions/cache@v5
with:
path: depends/sources
key: depends-sources-${{ hashFiles('depends/packages/*') }}
restore-keys: depends-sources-
key: depends-sources-v2-${{ hashFiles('depends/packages/*', 'depends/patches/native_cxxbridge/Cargo.lock', 'Cargo.lock') }}
restore-keys: depends-sources-v2-
lookup-only: true

- name: Cache Rust vendor sources
id: rust-vendor-cache
uses: actions/cache@v5
Comment thread
PastaPastaPasta marked this conversation as resolved.
with:
path: |
depends/sources/native_cxxbridge-*-vendored.tar.gz
depends/sources/vendored-crates-*.tar.gz
key: depends-rust-vendor-sources-${{ hashFiles('depends/Makefile', 'depends/funcs.mk', 'depends/packages/native_cxxbridge.mk', 'depends/packages/native_rust.mk', 'depends/patches/native_cxxbridge/Cargo.lock', 'Cargo.lock') }}

- name: Download sources
if: steps.cache-check.outputs.cache-hit != 'true'
run: make -C depends download
if: |
steps.cache-check.outputs.cache-hit != 'true' ||
steps.rust-vendor-cache.outputs.cache-hit != 'true'
run: |
make -C depends RUST=1 download
# The cache producer normally runs on ARM, while the Rust consumer
# runs on x86_64. Native Rust is selected from the build architecture,
# so fetch the x86_64 compiler archive explicitly as well.
make -C depends BUILD=x86_64-pc-linux-gnu RUST=1 download-one

- name: Select Rust vendor artifact
id: vendor-artifact
if: github.event_name != 'schedule' && steps.rust-vendor-cache.outputs.cache-hit != 'true'
run: echo "name=depends-rust-vendor-sources-${{ github.run_id }}" >> "$GITHUB_OUTPUT"

- name: Upload Rust vendor sources
if: steps.vendor-artifact.outputs.name != ''
uses: actions/upload-artifact@v6
with:
name: ${{ steps.vendor-artifact.outputs.name }}
path: |
depends/sources/native_cxxbridge-*-vendored.tar.gz
depends/sources/vendored-crates-*.tar.gz
compression-level: 0
retention-days: 1
overwrite: true
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,27 @@ compile_commands.json
# Linux perf profiling artifacts
perf.data
perf.data.old

# Generated by Cargo
/target/
/rust/target/

# Cargo configuration
/.cargo/.configured-for-*
/.cargo/config
/.cargo/config.toml
/.cargo/dash-build.toml
/.cargo/*-linker

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Generated by cargo mutants
# Contains mutation testing data
**/mutants.out*/

# FFI bridge
/rust/*/gen/
Loading
Loading