dtolnay/no-panic
Attribute macro to require that the compiler prove a function can't ever panic observed · 2026-08-28
Health v2 · maintenance only
91/100
- Activity 95
- Release rhythm 81
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 48.5
- age_days: 2952
- days_rel: 46
- days_push: 30
- n_releases_24m: 7
Adoption not part of the score
1214 stars · 20 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Rust attribute macro that makes the compiler prove at link time that a marked function can never panic, failing compilation with a linker error naming the offending function otherwise. It is a lightweight proc-macro crate published on crates.io by dtolnay.
Use cases
- guarantee a function cannot panic in Rust
- catch potential panics at compile time
- verify no-panic safety of parsing or slicing code
- hardening embedded or safety-critical Rust code
- detect panics in release builds via linker errors
When to choose
- you need static, link-time proof that specific Rust functions are panic-free
- you are building release binaries and can tolerate debug-mode compile issues
- your build uses panic = "unwind" and invokes a linker
When to avoid
- you rely on cargo check or library-only builds, which skip linking and thus panic detection
- your code is built with panic = "abort"
- you need const functions or debug-mode compilation of optimization-dependent functions
Facets
library · maturity stable
testing error-handling developer-tools developer-tools programming-languages performance rust cross-platform attribute-macro panic-detection link-time-verification rust-proc-macro
2 sources
- readme: https://github.com/dtolnay/no-panic · fetched 2026-08-28 · 82d7c2f66a12
- registry_crates: https://crates.io/api/v1/crates/no-panic · fetched 2026-08-29 · d0174438d448
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| dtolnay/no-panic | main | 91 |
For agents
markdown · JSON · MCP: product_card(name="dtolnay/no-panic")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem