zijiren233/Cargo Cross Action

A configurable GitHub Action to build, test, and check Rust projects with cross-compilation support

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
commandCommand to execute (for example: build, check, clippy, doc, setup, exec)nobuild
targetRust target triple(s) to build for (newline-separated recommended, comma-separated also supported)no""
targetsRust target triple(s) to build for (newline-separated recommended, comma-separated also supported)no""
profileBuild profile (debug or release)norelease
featuresComma-separated list of features to activateno
no-default-featuresDo not activate default featuresnofalse
all-featuresActivate all available featuresnofalse
packagePackage to build (workspace member)no
excludeExclude packages from the build (must be used with workspace)no
binBinary target to buildno
workspaceBuild all workspace membersnofalse
manifest-pathPath to Cargo.tomlno
source-dirThe directory containing the Rust project to buildno
working-directoryThe directory containing the Rust project to build, default is github.workspaceno
github-proxy-mirrorGitHub proxy mirror URL for downloading cross compilersno
cross-compiler-dirDirectory to store cross compilersno
ndk-versionAndroid NDK version for Android builds (e.g., r27d, r29). Leave empty for default version (r27d LTS)no
glibc-versionGlibc version for GNU targets (e.g., 2.31, 2.42). Leave empty for default versionno
iphone-sdk-versioniPhone SDK version for iOS targets (e.g., 17.0, 18.2, 26.2). On non-macOS uses bundled SDKs, on macOS uses installed Xcode SDK. Leave empty for default version (26.2)no
iphone-sdk-pathOverride iPhoneOS SDK path for device targets (skips version lookup). Only for native macOS buildsno
iphone-simulator-sdk-pathOverride iPhoneSimulator SDK path for simulator targets (skips version lookup). Only for native macOS buildsno
macos-sdk-versionmacOS SDK version for Darwin targets (e.g., 14.0, 15.2, 26.2). On non-macOS uses bundled SDKs, on macOS uses installed Xcode SDK. Leave empty for default version (26.2)no
macos-sdk-pathOverride macOS SDK path directly (skips version lookup). Only for native macOS buildsno
freebsd-versionFreeBSD version for FreeBSD targets (13 or 14). Default is 13no
qemu-versionQEMU version for Linux cross-compilation runnernov10.2.0-rc1
cross-make-versionCross-compiler make version (e.g., v0.7.7). Leave empty for default version (v0.7.7)no
use-default-linkerUse the default system linker for cross-compilation (deprecated, use no-toolchain-setup instead)no
no-toolchain-setupSkip downloading and configuring cross-compilation toolchainnofalse
init-runnerInitialize target runner variables for setup/exec commandsnofalse
ccForce set the C compilerno
cxxForce set the C++ compilerno
arForce set the archiver for targetno
linkerForce set the linker for targetno
cflagsC compiler flags (cc crate)no
cxxflagsC++ compiler flags (cc crate)no
cxxstdlibC++ standard library to link against (cc crate)no
rustc-wrapperCompiler wrapper for caching tools like sccache, ccache, etc.no
enable-sccacheEnable sccache for compilation caching (automatically sets rustc-wrapper)nofalse
sccache-dirSccache local cache directoryno
sccache-cache-sizeMaximum sccache cache size (e.g., 2G, 10G)no
sccache-idle-timeoutSccache daemon idle timeout in seconds (0 for permanent)no
sccache-logSccache log level (error, warn, info, debug, trace)no
sccache-no-daemonDisable sccache background daemonnofalse
sccache-directEnable sccache preprocessor cachingnofalse
sccache-s3-bucketS3 bucket name for sccache storageno
sccache-s3-endpointS3 endpoint for sccache (e.g., for R2, MinIO)no
sccache-s3-regionS3 region for sccacheno
sccache-redis-endpointRedis endpoint URL for sccacheno
sccache-gcs-bucketGoogle Cloud Storage bucket for sccacheno
sccache-azure-connection-stringAzure storage connection string for sccacheno
sccache-gha-enabledEnable GitHub Actions cache backend for sccachenofalse
cc-no-defaultsDisable default cc crate compiler flags (sets CRATE_CC_NO_DEFAULTS)nofalse
cc-shell-escaped-flagsParse *FLAGS variables using shell argument parsing rules (cc crate)nofalse
cc-enable-debugEnable cc crate debug output to see compiler commandsnofalse
rustflagsAdditional rustflagsno
static-crt[DEPRECATED: Use crt-static instead] Control CRT linking mode: 'true' for static (+crt-static), 'false' for dynamic (-crt-static), empty for default behaviorno""
crt-staticControl CRT linking mode: 'true' for static (+crt-static), 'false' for dynamic (-crt-static), empty for default behaviorno""
panic-immediate-abortEnable panic=immediate-abort strategy (adds -Zunstable-options -Cpanic=immediate-abort, enables build-std). This is a real panic strategy since nightly-2025-09-24, can also be set via `panic = "immediate-abort"` in Cargo.tomlno""
build-stdUse -Zbuild-std for building standard library from source (true for default, or specify crates like 'core,alloc')nofalse
build-std-featuresFeatures to enable for -Zbuild-std (e.g., panic_immediate_abort, optimize_for_size)no
clean-cacheClean build cache before buildingnofalse
no-stripDo not strip binariesnofalse
verboseVerbose level (0-4, or 'true' for level 1)no0
show-all-targetsShow all supported targets and exitnofalse
argsAdditional arguments to pass to the underlying cargo commandno
cargo-argsAdditional arguments to pass to the underlying cargo commandno
passthrough-argsArguments to pass after -- (e.g., for cargo test: --show-output)no
cross-argsAdditional cargo-cross arguments appended after the commandno
toolchainRust toolchain to use (stable, nightly, etc.)no
cargo-trim-pathsSet CARGO_TRIM_PATHS environment variable for reproducible buildsno
trim-pathsSet CARGO_TRIM_PATHS environment variable for reproducible buildsno
no-embed-metadataAdd -Zno-embed-metadata flag to cargonofalse
rustc-bootstrapSet RUSTC_BOOTSTRAP environment variable (1 for all crates, -1 for stable behavior, or crate_name for specific crate)no
target-dirDirectory for all generated artifactsno
binsBuild all binary targetsnofalse
libBuild only the library targetnofalse
exampleExample target to buildno
examplesBuild all example targetsnofalse
testIntegration test to buildno
testsBuild all test targetsnofalse
benchBenchmark target to buildno
benchesBuild all benchmark targetsnofalse
all-targetsBuild all targets (equivalent to --lib --bins --tests --benches --examples)nofalse
releaseBuild optimized artifacts with the release profilenofalse
quietDo not print cargo log messagesnofalse
message-formatThe output format for diagnostic messagesno
ignore-rust-versionIgnore rust-version specification in packagesnofalse
lockedAsserts that exact same dependencies are used as Cargo.locknofalse
offlinePrevents Cargo from accessing the networknofalse
frozenEquivalent to specifying both --locked and --offlinenofalse
lockfile-pathPath to Cargo.lock (unstable, requires nightly)no
jobsNumber of parallel jobs to runno
keep-goingBuild as many crates as possible, don't abort on first failurenofalse
future-incompat-reportDisplays a future-incompat report for warningsnofalse
artifact-dirCopy final artifacts to this directory (unstable, requires nightly)no
colorControl when colored output is used (auto, always, never)no
build-planOutputs a series of JSON messages (unstable, requires nightly)nofalse
timingsOutput information about compilation timingno
cargo-cwdChange current working directory before executingno
skip-cacheSkip cache for cargo-cross binary (always build from source)nofalse
namedescription
targetsTargets that were processed
all-targetsAll supported targets (only when show-all-targets is true)