hotpath-rs: the recommended setup downloads a skill from GitHub, and the workspace is thirty test crates
Rust profiler for CPU, memory, SQL, HTTP, and async performance, with Prometheus and Grafana support.
At a glance
- What is it?
- A Rust profiler that instruments functions, locks, channels, SQL, and HTTP, exports to Prometheus and Grafana, and reports on exit or in a TUI. Two things sit behind the feature list: the quick start hands your repository to an agent working from instructions fetched at runtime, and the workspace is mostly integration crates, one per dependency version.
- Who is it for?
- It suits a Rust service where you suspect lock contention, a slow query, or an I/O stream rather than a plain hot loop, and the manual path costs one dependency line and a feature flag. Two cautions.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- pawurb/hotpath-rs1,929 ★ · +214
| Repository | 2026-09-12 | 2026-11-22 |
|---|---|---|
| pawurb/hotpath-rs | 1.7k | 1.9k |
214 Stars in the last 71 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The recommended setup fetches instructions from GitHub at runtime
The quick start is two commands, and the second one runs an agent.
cargo install hotpath --version '^0.28'
hotpath init --agent claude # or --agent codex / --agent opencodeWhat that second command does is worth reading as a security decision rather than a convenience. It downloads a setup skill from the repository on GitHub, then starts an interactive session in Claude Code, Codex, or OpenCode using that file as its instructions. The agent inspects the project, adds the feature-gated dependency, instruments main along with a starting set of functions, channels, and locks, and then checks that the project compiles both with profiling enabled and disabled. You approve each edit through the agent's own permission prompts, and the command needs curl plus the chosen agent CLI on PATH. The page also offers the skill without the CLI, by copying it to a path under your home directory and invoking it inside a session. Either way the instructions arrive from the network at setup time, not from the crate you just installed.
Four feature flags keep the macros as noops
The manual path is a manifest snippet.
[dependencies]
hotpath = "0.28"
[features]
hotpath = ["hotpath/hotpath"]
hotpath-cpu = ["hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath/hotpath-alloc"]
hotpath-prometheus = ["hotpath/hotpath-prometheus"]The claim behind that layout is that the library has no compile time or runtime cost unless a feature is switched on, because every library dependency is optional and therefore not compiled, and every macro is a noop until profiling is enabled. Getting a report means naming the flags twice, at compile time and at run time.
cargo run --features='hotpath,hotpath-alloc'The instrumentation itself is two attributes, one on the entry point and one per function, plus a block macro for a named region. With tokio the page is explicit about attribute order: the runtime attribute goes first and the hotpath attribute second, which is the kind of detail that only matters until you get it wrong once.
The workspace is one library and thirty integration crates
The root manifest is a workspace, and reading the member list is the fastest way to understand what the project is really made of. Three crates carry the library: hotpath, hotpath-macros, and hotpath-drain, plus three meta crates beside them. Everything else begins with test-, and there is one per dependency rather than per feature: five mutex variants across the standard library, parking_lot, tokio, and async-lock, four read-write lock variants, five channel implementations from crossbeam through flume, and separate crates for sqlx 0.8 and 0.9, reqwest 0.12 and 0.13, ureq, axum, and diesel. One more is excluded from the workspace outright, and the comment says why: another library's sqlite bindings and sqlx's sqlite bindings pull conflicting versions of the same native link, so that crate has to be built by its own manifest path instead.
The test recipe runs one serial command per integration crate
A single task drives the whole suite, and its shape explains the workspace layout. The first thing it does is run the noop example of the all-features crate, which is the disabled-cost claim turned into a test. After that come a long list of test invocations, each one naming a single integration test file, enabling the hotpath feature, and passing the same two flags.
test_all:
cargo run -p test-all-features --example all_noop
cargo test --features hotpath --test guards -- --nocapture --test-threads=1
cargo test --features hotpath --test user_metadata -- --nocapture --test-threads=1Serialising the tests with a thread count of one is the giveaway that they share global state, which a profiler reporting into process-wide tables would. Output capture is off for the same reason. Two sibling targets cover benchmarking and both call shell scripts instead of inline commands, one for the current state and one for the meta profiler, and a separate shell script at the root loads the binary rather than benchmarking it. So the same repository holds a library, a CLI, a benchmark harness, and about thirty compatibility crates, and the test task treats them as thirty separate programs.
Two directories at the root both look like the library
The repository root holds a hotpath directory and a crates directory, and the manifest only ever points at the second one, where the workspace members and their paths live. Nothing on the front page explains what the top-level directory holds. Around it sit files that each point at a different part of the workflow: a changelog configuration for generating release notes from commits, a documentation indexing configuration, agent instruction files for Claude and for coding agents generally, a load test script, a sample Compose file with a docker directory beside it, and a development documentation folder. The dependency lockfile is committed, which is uncommon for a library and sensible for a workspace of thirty test crates that all have to resolve together. Taken as a whole, the root reads like a project where the profiler is one product among several: a CLI with an SSH demo, a dashboard exporter, an agent server for querying profiling data, and a skill that an agent can install.
The documentation list ends with a link that has no address
The reference list at the bottom of the page is a set of labelled links, one per capability: profiling modes, profiling overhead, functions, CPU profiling, threads, async data flow, locks, SQL tracing, HTTP requests, axum tracing, and then I/O tracing, which is written as a label followed by an empty pair of brackets. The visible text stops there, so the list of capabilities has no closing entry and one entry has no destination. The sample report earlier in the page has the same kind of edge: it prints a header line with the total time and the enabled metric groups, then a table with call counts, averages, percentiles, totals, and a share column, and that table stops mid-separator row. What the numbers do show is the shape of the output, with a hundred calls to an async function accounting for most of the total, which is the kind of attribution the tool exists to produce.
Three patch tags in three days and a minor you can pin
The release record moves faster than a profiler usually does. Version 0.28.1 and 0.28.2 were both published on 2026-10-01, the second about three hours after the first, and 0.28.3 followed on 2026-10-03. The last commit on the default branch is dated 2026-10-01. The workspace manifest pins its internal crates at 0.28.3, so the library, the macro crate, the drain crate, and the three meta crates move in lockstep by design. What that means for a user is visible in the two install lines on the page: the dependency snippet asks for 0.28 and the CLI asks for a 0.28 caret range, so a project that pins the manifest stays on a patch line while the tool you invoke can float within the minor. Since the tool instruments code paths and prints them at exit, that difference matters more here than it would for a library that nobody runs.
Editorial conclusion
It suits a Rust service where you suspect lock contention, a slow query, or an I/O stream rather than a plain hot loop, and the manual path costs one dependency line and a feature flag. Two cautions. The path the page calls quickest is an agent that downloads its instructions from the repository at the moment you run it and then edits your manifest and your functions, so treat that as a review session rather than a setup step and read the diffs. And the version moves fast: three patch tags landed inside three days, so pin the minor in your own manifest the way the page does and re-read the changelog when a profiler changes under a running service.
Frequently asked questions
How do I add hotpath to an existing Rust project?
Add hotpath = "0.28" under dependencies and enable the feature flags you want: hotpath, hotpath-cpu, hotpath-alloc, or hotpath-prometheus. With no feature enabled the macros are noops and the optional dependencies are not compiled.
What can hotpath-rs profile besides function timing?
Channels, streams, and futures, sync and async I/O with bytes and latency, SQL queries for sqlx and Diesel, client calls for reqwest and ureq, axum routes, Mutex and RwLock wait and hold times, and tokio worker and queue metrics.
Can an AI coding agent set up hotpath for me?
Yes. hotpath init with the claude, codex, or opencode agent flag downloads the hotpath_init skill from GitHub and starts a session with it, then instruments your entry point and a starting set of functions, channels, and locks. It needs curl and the chosen CLI on PATH.
Do I need my own dashboards to use hotpath-rs?
No. A TUI demo is reachable over ssh demo.hotpath.rs with nothing installed, and reports print on exit. Prometheus and Grafana support is described as exporting metrics into dashboards you already run.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/pawurb-hotpath-rs)Star history chart for your README
[](https://hysenlabs.com/projects/pawurb-hotpath-rs)Was this useful?