| Crates.io | cargo-firstpage |
| lib.rs | cargo-firstpage |
| version | 0.2.3 |
| created_at | 2021-08-29 10:19:59.84066+00 |
| updated_at | 2025-05-21 08:57:56.603136+00 |
| description | Shows only the first page of rustc output |
| homepage | https://github.com/cecton/cargo-firstpage |
| repository | https://github.com/cecton/cargo-firstpage |
| max_upload_size | |
| id | 443694 |
| size | 23,941 |
Show only the first page of rustc output.
cargo install cargo-firstpage
Add firstpage before any cargo command:
This runs cargo check but only shows the first page of output:
cargo firstpage check
This runs cargo run -p myproject:
cargo firstpage run -p myproject
All arguments after firstpage are passed directly to cargo without
exception. cargo-firstpage does not have any option is and not
parametrizable.
cargo-watchYou can use it like this:
cargo watch -x "firstpage check"
If you want to see just the first page of the build output while keeping your program’s error messages:
cargo watch -x "firstpage build" -x "run"
For TUI (text user interface) programs, use this in one terminal:
CARGO_TERM_COLOR=always cargo watch \
-x "firstpage build 2>/tmp/logs" \
-x "run 2>>/tmp/logs"
And this in another terminal:
tail -F /tmp/logs
This setup keeps your program's stderr output scrolling while only showing the first page of build messages.
If your shell prompt takes up more than one line, cargo-firstpage might
miscalculate how much space is available for output. To fix this, you can set
the PROMPT_SIZE compilation parameter when installing the tool.
If your prompt is 2 lines high:
PROMPT_SIZE=2 cargo install cargo-firstpage --force
Adjust the value of PROMPT_SIZE to match the number of lines your prompt
uses.
In most cases, the useful error messages appear at the end of the output.
However, sometimes rustc shows important information at the beginning, like
how to disable a warning.
This project does not accept issues, pull requests, or other contributions. Forks are welcome — feel free to use, modify, and build on it as needed.
cargo-firstpage, but keeps the progress bar and offers more
options. The author claims it processes cargo output more accurately. Try
this if you have issues with cargo-firstpage.cargo-watch
with a small TUI that makes it easier to filter and read logs. Worth checking
out if you want to improve the readability and scrolling of rustc output.