A simple CLI tool that runs cargo check → build → run at the project root (auto-detected).
Largo automatically finds the nearest Rust project by searching for a Cargo.toml file, then runs the standard development workflow:
cargo check- Fast syntax and type checkingcargo build- Compile the projectcargo run- Execute the binary
This is especially useful when you're working in a subdirectory of a Rust project and want to quickly test the entire project without navigating to the root.
cargo install largo-cligit clone https://github.com/stevecellbio/largo
cd largo
cargo install --path .# Run from anywhere in your Rust project
largoThis will:
- Find the nearest
Cargo.tomlfile by walking up the directory tree - Run
cargo check, thencargo build, thencargo runin that directory
largo [OPTIONS] [-- <RUN_ARGS>...]
Options:
--no-check Skip cargo check
--no-build Skip cargo build
--no-run Skip cargo run
-p, --path <PATH> Start searching from this directory instead of current directory
-h, --help Print help
-V, --version Print version
Arguments:
[RUN_ARGS]... Arguments to pass to cargo run# Skip the check step
largo-cli --no-check
# Only build, don't run
largo-cli --no-run
# Pass arguments to your program
largo-cli -- arg1 arg2 --flag
# Start from a specific directory
largo-cli --path /path/to/project
# Only run cargo check and build
largo-cli --no-run# You're working in src/modules/parser/
pwd
# /home/user/my-rust-project/src/modules/parser
# Instead of doing:
cd ../../..
cargo check
cargo build
cargo run
# Just do:
cargo run largoOutput:
Found Rust project at: /home/user/my-rust-project
Running cargo check...
Checking my-project v0.1.0 (/home/user/my-rust-project)
Finished dev [unoptimized + debuginfo] target(s) in 0.12s
Running cargo build...
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running cargo run...
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/my-project`
Hello, world!
- Infinite recursion protection: Largo detects if you're trying to run it on the largo project itself and prevents execution
- Respects cargo's exit codes: If any step fails, largo stops and returns the appropriate exit code
Largo is a musical term meaning "slow and dignified" - perfect for a tool that takes its time to check, build, and run your code properly, one step at a time.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.