rsbuild 0.3.0

A self-sufficient runtime to build projects
rsbuild-0.3.0 is not a library.

rsbuild

Crates.io License: MIT

A self-sufficient runtime to build projects.

rsbuild provides commands for building Python wheels, Docker containers, Rust binaries, and managing Cython compilation workflows.

Installation

From crates.io

cargo install rsbuild

From source

git clone https://github.com/JeanMaximilienCadic/rsbuild
cd rsbuild
cargo install --path .

Usage

rsbuild [OPTIONS] <COMMAND>

Global Options

Option Description
-v, --verbose Increase output verbosity
-q, --quiet Suppress non-essential output
--dry-run Preview commands without executing them
-h, --help Print help information
-V, --version Print version

Commands

Command Description
build Build artifacts (wheel, docker, cargo)
pull Pull Docker images
run Run Docker Compose services
clean Clean build artifacts and caches
cython Compile Cython modules and package into wheel
glances Run glances system monitor
completions Generate shell completion scripts
doctor Check if required tools are installed

Build Subcommands

# Build Python wheel
rsbuild build wheel

# Build all configured targets
rsbuild build all

# Build Rust binary (release mode by default)
rsbuild build cargo
rsbuild build cargo release
rsbuild build cargo debug

# Build Docker Compose service
rsbuild build docker <service>
rsbuild build docker <service> --no-cache

Pull Subcommands

# Pull all configured images
rsbuild pull all

# Pull a specific service image
rsbuild pull service <name>

Run Docker Services

# Run a Docker Compose service
rsbuild run <service>

# Run with additional arguments
rsbuild run <service> -- --env FOO=bar

Clean

# Remove build artifacts, egg-info, pycache, and notebook checkpoints
rsbuild clean

# Also remove Rust target directory
rsbuild clean --all

Cython

# Compile Cython modules for a package
rsbuild cython <package>

Doctor

# Check system for required tools
rsbuild doctor

Shell Completions

# Generate completions for your shell
rsbuild completions bash > ~/.local/share/bash-completion/completions/rsbuild
rsbuild completions zsh > ~/.zfunc/_rsbuild
rsbuild completions fish > ~/.config/fish/completions/rsbuild.fish

Dry Run Mode

Preview what commands would be executed without running them:

rsbuild --dry-run build wheel
rsbuild --dry-run clean --all

Project Structure

src/
├── main.rs           # Entry point
├── cli.rs            # CLI definitions (clap)
├── error.rs          # Error types (thiserror)
├── executor.rs       # Command execution utilities
└── commands/
    ├── mod.rs        # Module exports
    ├── build.rs      # Build commands
    ├── clean.rs      # Clean command
    ├── cython.rs     # Cython compilation
    ├── doctor.rs     # System diagnostics
    ├── pull.rs       # Docker pull commands
    └── run.rs        # Docker run command

License

MIT