cross-rs/cross
61.4
Adequate · 29 September 2026
15.3k
lines of production code
Rust
with Python
2
measurements over time
What this system is
This system is a Rust-based cross-compilation tool that enables building code for various architectures using Docker or Podman containers. It provides a modular CLI for managing cross-compilation targets, handling container resources, and integrating with CI pipelines. The tool supports multiple operating systems and architectures, including ARMv6 and LoongArch64, and includes utilities for managing Docker images and volumes.
How it got here
2016 — Architectural refactor and modernization
4 changes.
The project underwent a complete source rewrite, transitioning from a monolithic script to a modular library structure with dedicated modules for configuration, CLI parsing, and shell output. This refactor was accompanied by a major dependency overhaul, including an upgrade to Rust 2024 and clap 4, as well as updates to Docker base images to Ubuntu 24.04.
2019–2022 — CI infrastructure and toolchain expansion
8 changes.
This period focused on restructuring the CI system with granular target filtering and a new test suite, while expanding supported architectures to include ARMv6 and LoongArch64. Development workflow was streamlined through the introduction of the xtask CLI for build and release management, alongside a new cross-util binary for Docker resource handling. Underlying Docker integration was also refactored to improve maintainability and support for engine-specific configurations.
Features
Add ARMv6 hard-float and LoongArch64 cross-compilation configurations
New crosstool-ng configuration files are introduced to support building toolchains for ARMv6 hard-float (arm-unknown-linux-gnueabihf) and LoongArch64 architectures (loongarch64-unknown-linux-gnu and loongarch64-unknown-linux-musl). Users can now generate cross-compilers targeting ARMv6 with hardware floating-point support, as well as LoongArch64 systems using either the GNU libc or the musl libc.
crosstool-ng · high confidence
Introduce cross-util binary and refine cross fallback behavior
A new \cross-util\ binary is added to manage cross-related Docker resources (images, volumes, containers, and clean operations) via subcommands. The main \cross\ binary now explicitly handles fallback to the host \cargo\ when cross compilation is not required, ensuring that the host cargo's exit code is correctly propagated and that warnings/errors in CI or when \CROSS\_NO\_WARNINGS=1\ is set cause an early exit rather than silent fallback.
src/bin · high confidence
Introduce xtask CLI for build, CI, and changelog management
The \xtask\ subcommand tool is now available for managing the project's development workflow. It includes \build-docker-image\ to construct and push cross-compilation Docker images with support for cache options (\--cache-from\, \--cache-to\) and custom build arguments, \ci-job\ to provide metadata and validation for CI pipelines (such as checking tag versions against Cargo.toml), \changelog\ to build and validate release notes from JSON entries, and \codegen\ to auto-generate the list of provided Docker images. Additionally, \install-git-hooks\ sets up pre-commit and pre-push scripts to run checks and tests automatically.
xtask/src · high confidence
New cross-util subcommands for managing Docker resources and running commands
The \cross-util\ CLI now includes dedicated subcommands to manage Docker containers, images, and volumes, as well as to run arbitrary commands inside containers. Users can list, create, remove, and prune data volumes and containers, and list or remove Docker images (including custom images) with support for JSON output. A new \run\ subcommand allows executing arbitrary shell commands within a cross-compilation container, supporting interactive sessions and specific target selection. These changes consolidate resource management and debugging capabilities into the \cross-util\ tool.
src/bin/commands · high confidence
Repository initialization with project configuration and documentation
The repository has been initialized with essential project configuration files, including \.editorconfig\ for consistent code formatting, \clippy.toml\ to disallow \Path::display\ in favor of safer Unicode handling, and \deny.toml\ to enforce dependency and license policies. The \README.md\ has been updated to reflect the project's move to the cross-rs organization, clarifying that it supports both Docker and Podman, and providing updated installation and usage instructions. Additionally, standard governance documents such as \CODE\_OF\_CONDUCT.md\ and \CONTRIBUTING.md\ have been added, along with license files (\LICENSE-APACHE\, \LICENSE-MIT\).
(repo-wide) · high confidence
Behavioural changes
Complete source rewrite and architectural refactor
The \src\ directory has been completely rewritten, replacing the previous single-file \main.rs\ and \docker.rs\ implementation with a modular library structure. This change introduces a new configuration system using \Cross.toml\ and \Cargo.toml\ metadata (via \cross\_toml.rs\ and \config.rs\), a dedicated CLI argument parser (\cli.rs\), and a new shell output system (\shell.rs\) with verbosity and color support. The build process now includes a build script (\build.rs\) to embed commit information and handle sandboxing flags, while path handling is abstracted into \file.rs\ to support Windows POSIX conversions. This refactor shifts the tool from a simple wrapper to a structured application with distinct modules for cargo interaction, docker management, and configuration parsing.
src · high confidence
Docker images updated to Ubuntu 24.04 base
The Docker images for all supported cross-compilation targets have been updated to use Ubuntu 24.04 as their base operating system. This change affects the underlying environment for building Rust code for various architectures, including Linux, Android, FreeBSD, and Windows (via Wine).
docker · high confidence
Docker integration refactored with engine-specific ignore files and build options
The Docker module has been restructured into dedicated files (build, custom, engine, image, local, remote, shared) to improve maintainability. Users can now use \.containerignore\ for Podman and \.dockerignore\ for Docker, with automatic selection and warnings if the wrong file is used. Custom Dockerfile builds now support explicit \--output\ flags and progress control via the \CROSS\_BUILD\_PROGRESS\ environment variable. The engine detection logic has been updated to better handle rootless containers and remote execution, and the \seccomp.json\ profile is now included to restrict container capabilities.
src/docker · high confidence
Granular CI target filtering via labels and \`/ci try\` command
The CI system now supports more precise control over which build targets and tests are executed. Users can use the \/ci try\ command to trigger checks on specific pull requests, with options to specify tests, enable verbose output, or enable cross-debugging. Additionally, CI jobs can be filtered by PR labels (e.g., \CI-\ prefixed labels) to run only relevant targets, and the \no-ci-tests\ label allows skipping tests entirely. This replaces the previous bors-based workflow with a more flexible, label-driven matrix generation approach.
xtask/src/ci · high confidence
New CI test suite and build infrastructure for Cross
The CI system has been restructured with a new set of shell scripts to validate Cross functionality. The \build\_release.sh\ script handles release builds, including a specific workaround for glibc version mismatches on the x86\_64-unknown-linux-gnu target. A shared library (\shared.sh\) provides common utilities like retry logic and binary path resolution. The test suite now includes dedicated scripts for verifying Docker-in-Docker execution, remote Docker support, Podman compatibility, and the use of custom or foreign toolchains (such as Alpine and Ubuntu images). Additionally, new tests cover the Zig-based cross-compilation image and the \cargo-bisect-rustc\ integration, ensuring these specific features work correctly in the CI environment.
ci · high confidence
Test coverage
14 commits adding/updating tests in src/tests
Test coverage in src/tests — 14 commits (1 fix), 2 files.
src/tests · high confidence · unverified
Dependencies
Major dependency overhaul and project restructuring
The project has undergone a significant dependency update, upgrading the Rust edition to 2024 and the MSRV to 1.85.0. Key library changes include replacing \error-chain\ with \thiserror\, \atty\ with \is-terminal\, and \walkdir\ with \ripgrep\'s \ignore\ crate (though \walkdir\ remains optional). The CLI framework has been upgraded from clap 3 to clap 4, and error reporting now uses \color-eyre\. Additionally, a new \xtask\ workspace member was added for build automation, and the main package version was bumped to 0.2.5.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 58 → 61 (+3.5)
- Rubric changed (rubric-2026.09.9 → rubric-2026.09.17) — scores are not directly comparable.
Lenses
- Code Health 91 → 91 (-0.0)
- Architecture 100 → 96 (-3.6)
- Maturity 60 → 59 (-1.0)
- Readiness 76 → 57 (-19.7)
- Security 40 → 57 (+17.1)
Resolved (3)
- Hotspot: src/lib.rs (src/lib.rs)
- Hotspot: xtask/src/build_docker_image.rs (xtask/src/build_docker_image.rs)
- cross::docker::remote::copy_dir (cognitive 17) (src/docker/remote.rs)
New (22)
- Ambiguous distinction between instance and static existence checks without clear naming convention or documentation context. While 'static' implies a class-level check, the naming is inconsistent with standard Rust patterns (often is_running vs is_running_for_pid or similar).
- Ambiguous distinction between instance and static exit/termination. Same issue as exists.
- Ambiguous distinction between instance and static finish/exit handling. Same issue as exists.
- DockerIgnore::is_ignored (cognitive 25) (src/docker/docker_ignore.rs)
- DockerIgnore::parse (cognitive 23) (src/docker/docker_ignore.rs)
- Fingerprint::_read_dir (cognitive 20) (src/docker/remote.rs)
- Naming inconsistency in configuration resolution. confusable_target suggests error handling for ambiguous targets, while target suggests simple retrieval. They serve different purposes but are both related to target resolution.
- Off the main sequence: cross
- Outdated: chrono
- Outdated: clap
- Outdated: eyre
- Outdated: home
- Outdated: libc
- Outdated: owo-colors
- Outdated: serde
- Outdated: serde_json
- Outdated: thiserror
- Outdated: which
- Redundant methods for stopping a container. stop_default likely calls stop with a default timeout. This is a minor convenience duplication.
- Redundant/Conflicting methods for checking if a directory is ignored. Similar to the above, one takes str/returns bool, the other takes Path/returns Result.
- …and 2 more
Changes since last survey
- 3 commits — 3 feature/other, 0 fixes
By area
- (repo) — 2 commits
- docker/ubuntu.sources — 1 commit
Notable commits
- change: enh: add all Ubuntu ports architectures to sources
- change: enh: add all Ubuntu ports architectures to sources (#1785)
- change: feat(remote): support .dockerignore when copying files to remote host (#1801)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
cross-rs/cross was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 74e99b2223de06166f8cdcc1af7f1308ec52baf4 — the exact code this score is about.
- Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-705631bb727e.