rmatrix is an implementation of the cmatrix project, but in Rust using the ratatui crate.
The crate name on crates.io is rjmatrix (someone took rmatrix).
cargo install rjmatrixUsage: rjmatrix [OPTIONS]
Options:
-c, --color <COLOR> blue, cyan, red, purple, yellow, green, rainbow
-s, --speed <SPEED> 1 (slowest) - 10 (fastest)
-d, --direction <DIRECTION> up, down, left, right
-b, --bold Bold text
-h, --help Print help
| Key | Action |
|---|---|
c |
Cycle to a random color |
0 – 9 |
Change speed (0 = fastest) |
↑↓←→ |
Change direction |
b |
Toggle bold |
q |
Quit |
- Resize-aware (vertical and horizontal)
- Depth effect: streams fade from white head to dim tail using a sqrt curve over line length
- Per-stream brightness variation for layered/3D feel
- Rainbow mode picks a locked color per stream
- Bold only highlights the head
This repo uses devenv + direnv to provide a reproducible Rust toolchain.
cd rmatrix
direnv allow # one-time, after installdevenv will provide rustc, cargo, etc. The toolchain is pinned in devenv.nix.
Any Rust stable toolchain >= 1.85 (required for edition = "2024").
cargo run --release # release mode is meaningfully smoother
cargo check # fast type-check loop while editing
cargo build --release # produces target/release/rjmatrixcargo install --path .Drops the binary in ~/.cargo/bin/rjmatrix.
The repo ships a flake using rustPlatform.buildRustPackage. Cargo.lock is the only source of truth — no extra generated files.
nix build
./result/bin/rjmatrix{
inputs.rmatrix.url = "github:RoastBeefer00/rmatrix";
# ...
environment.systemPackages = [ inputs.rmatrix.packages.${system}.default ];
}nix flake update # bumps nixpkgs / flake-utils pins- Bump
versioninCargo.tomlandflake.nix cargo build --release(sanity check)nix build(confirm reproducible build still works)- Tag + push:
git tag v1.x.y && git push --tags cargo publish
