a simple rust command line to shorten a few seconds in terminal
Find a file
cosc 4d9e7aaca6
Some checks failed
Rust / build (push) Has been cancelled
bump version number and more
-- bumped version number

-- acounted for some edge cases

-- tabbed some strings to make it look nice with rust commands
2026-01-24 10:04:40 -05:00
.github/workflows Create rust.yml 2025-08-20 16:36:13 -04:00
src bump version number and more 2026-01-24 10:04:40 -05:00
.gitignore Initial project setup with main logic and dependencies 2025-08-20 13:58:06 -04:00
Cargo.lock updated version ID 2025-08-21 16:33:52 -04:00
Cargo.toml bump version number and more 2026-01-24 10:04:40 -05:00
LICENSE Initial commit 2025-08-20 11:54:13 -04:00
README.md Update README.md 2025-08-21 14:16:59 -04:00

Largo

Crates.io License

A simple CLI tool that runs cargo check → build → run at the project root (auto-detected).

What it does

Largo automatically finds the nearest Rust project by searching for a Cargo.toml file, then runs the standard development workflow:

  1. cargo check - Fast syntax and type checking
  2. cargo build - Compile the project
  3. cargo 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.

Installation

From crates.io

cargo install largo-cli

From source

git clone https://github.com/stevecellbio/largo
cd largo
cargo install --path .

Usage

Basic usage

# Run from anywhere in your Rust project
largo

This will:

  • Find the nearest Cargo.toml file by walking up the directory tree
  • Run cargo check, then cargo build, then cargo run in that directory

Command-line options

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

Examples

# 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

Example workflow

# 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 largo

Output:

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!

Safety features

  • 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

Why "Largo"?

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.