reloaded-project/Build Optimized Rust Binary
Builds a min sized Rust binary or library. With self-built std, abort on panic, PGO and cross-compilation support.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| rust-project-path | Path to the Rust project | no | . |
| workspace-path | Path to the workspace root. Defaults to rust-project-path if not specified. | no | "" |
| build-library | Build a library instead of a binary. Requires `crate-type = ["cdylib", "staticlib"]` in Cargo.toml. | no | false |
| crate-name | Name of the Rust crate/package. Used for cache key and artifact directory. Legacy: also used for artifact naming if artifact-prefix not set (deprecated). | no | "" |
| target | The target platform for the Rust compiler | yes | — |
| features | Comma-separated list of features to include in the build | no | "" |
| run-tests-and-coverage | Run tests and coverage using the `devops-rust-test-and-coverage` action. | no | false |
| use-cache | Enable or disable the build cache using Swatinem/rust-cache. | no | true |
| no-default-features | Do not include default features in the build | no | false |
| rust-toolchain | The Rust toolchain to use for building. Can be nightly or a specific nightly version (nightly-2025-09-18). Note: stable and beta are not supported due to required nightly features. | no | nightly |
| use-cross | Use cross-rs for building. If false, use cargo. | no | false |
| use-pgo | Use Profile-Guided Optimization [PGO] to build the artifact. | no | false |
| pgo-project-path | Path to the Rust project used for gathering PGO data. Can be same or separate project. | no | . |
| pgo-benchmark-name | Benchmark name to use with PGO. | no | my_benchmark |
| abort-on-panic | Abort immediately on panic. If false, the default panic handler is used. | no | true |
| size-optimized-std | Enable size optimization for std by adding `optimize_for_size` to build-std-features. | no | false |
| upload-artifacts | Upload the built artifacts as a GitHub Actions artifact | no | true |
| upload-symbols-separately | Upload debug symbol files (.pdb, .dwp, .dSYM) as separate artifacts instead of bundling with main artifacts | no | true |
| use-friendly-target-names | Transform target triples to user-friendly names (e.g., x86_64-unknown-linux-gnu -> linux-x64) in artifact names | no | true |
| artifact-prefix | Prefix for artifact names. Combined with target/features to form final artifact name (e.g., 'MyApp' -> 'MyApp-linux-x64'). If empty, no prefix is used. | no | "" |
| artifact-name-exclude-features | Comma-separated list of features to exclude from artifact names. Set to empty string to include all. | no | c-exports,bench,nightly |
| additional-rustflags | Additional RUSTFLAGS to pass to the Rust compiler | no | "" |
| additional-rustc-args | Additional arguments to pass directly to rustc | no | "" |
| additional-std-features | Additional build-std features to include (comma-separated). | no | "" |
| upload-coverage-to-codecov | Uploads coverage to codecov if `run-tests-and-coverage` is enabled. | no | true |
| codecov-token | Codecov token for uploading coverage | no | — |
| use-tarpaulin | Use tarpaulin for code coverage. If false, code coverage will be disabled. | no | true |
| use-binstall | Whether to use cargo-binstall in the test-and-coverage action for installing tools like tarpaulin. This parameter is passed through to the devops-rust-test-and-coverage action. | no | true |
| install-binstall | Whether to install cargo-binstall to make it available for the test-and-coverage action. If false, assumes it is already available in the environment. | no | true |
| additional-test-args | Additional arguments passed directly to the cargo test command (e.g., '--ignored --test-threads=1 --lib') | no | "" |
| additional-tarpaulin-args | Additional arguments to pass to the cargo tarpaulin command | no | "" |
| packages | Packages to test (multi-line list). Passed through to devops-rust-test-and-coverage. Selects packages for testing; does not influence the build. | no | "" |
| codecov-flags | Flags to pass to Codecov for organizing coverage reports | no | unittests |
| codecov-name | Custom defined name for the coverage upload | no | codecov-umbrella |
Outputs
no outputs