cargo-green

Crates.iocargo-green
lib.rscargo-green
version0.4.0
sourcesrc
created_at2024-05-11 10:27:16.385342
updated_at2024-06-23 09:20:07.153223
descriptionCargo plugin to sandbox, cache & remote exec cargo builds
homepage
repositoryhttps://github.com/fenollp/supergreen
max_upload_size
id1236783
size10,980
Pierre Fenoll (fenollp)

documentation

README

cargo-green

Cached & remote-ready Rust projects builder.

cargo-green is a cargo plugin that sets a $RUSTC_WRAPPER then calls cargo.

Usage

No more dependencies than the transitive ones coming from usage of rustcbuildx.

cargo green build
cargo green b
cargo green check
cargo green c
cargo green clean
cargo green clippy
cargo green doc
cargo green d
cargo green new
cargo green init
cargo green add
cargo green remove
cargo green run
cargo green r
cargo green test
cargo green t
cargo green bench
cargo green update
cargo green search
cargo green publish
cargo green install
cargo green uninstall

# or, setting an alias in e.g. ~/.bashrc
alias cargo='cargo green'

# With this, one may also use this set of subcommands: [UNSTABLE API] (refacto into a `cache` cmd)
cargo supergreen config get   VAR*
cargo supergreen config set   VAR VAL
cargo supergreen config unset VAR
cargo supergreen pull-images             Pulls latest versions of images used for the build, no cache (respects $DOCKER_HOST)
cargo supergreen pull-cache              Pulls all from `--cache-from`
cargo supergreen push-cache              Pushes all to `--cache-to`

Installation

# Installs to ~/.cargo/bin
cargo install --locked --force --git https://github.com/fenollp/supergreen.git cargo-green rustcbuildx

# Make sur $CARGO_HOME/bin is in your $PATH
which cargo-green && which rustcbuildx
Commit count: 37

cargo fmt