| Crates.io | nobb |
| lib.rs | nobb |
| version | 0.1.0 |
| created_at | 2025-10-17 16:00:38.292539+00 |
| updated_at | 2025-10-17 16:00:38.292539+00 |
| description | Silence all console output by redirecting stdout and stderr to null device. |
| homepage | https://gitee.com/luzhihaoTestingLab/useful-cargo-packages |
| repository | https://gitee.com/luzhihaoTestingLab/useful-cargo-packages.git |
| max_upload_size | |
| id | 1887852 |
| size | 5,001 |
Silence all console output by redirecting stdout and stderr to the null device.
Add to your Cargo.toml:
[dependencies]
nobb = "0.1"
Example:
fn main() {
println!("This will be shown");
nobb::silence();
println!("This will NOT be shown");
eprintln!("Errors also silenced");
}
libc::freopen to redirect OS-level streams to the null device./dev/null; on Windows, uses NUL.println!/eprintln! from any crate will be silenced.MIT © 2025