Library / SDK
zkat/miette avatar
zkat/miette

miette: manifest says 7.6.0, the newest tag is 7.1.0, and the dev dependency block is labelled for a different crate

Fancy extension for std::error::Error with pretty, detailed diagnostic printing.

2,623 stars165 forksRustApache-2.0

At a glance

What is it?
zkat/miette is a Rust diagnostic reporting library whose pretty output is hidden behind a feature flag so libraries do not pay for it. Its packaging tells a sharper story than its documentation: a version gap of five minor releases, an edition from 2018 paired with a modern compiler floor, and a commented dependency block whose label no longer matches its contents.
Who is it for?
miette suits a library author who wants error types that stay usable as plain standard error types for consumers who do not want the rendering machinery, and that design holds up: three mandatory dependencies and everything else behind a feature. Two things to check before depending on it.
Can I use it commercially?
Yes. Apache-2.0 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 last received commits 152 days ago.
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 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • zkat/miette2,623 ★ · +9
Star history
Repository2026-10-042026-11-24
zkat/miette2.6k2.6k

9 Stars in the last 51 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The manifest is at 7.6.0 and the newest tag is from February 2024

The package manifest declares one version and the releases page declares another.

toml
name = "miette"
version = "7.6.0"
authors = ["Kat Marchán <[email protected]>"]
edition = "2018"
rust-version = "1.82.0"

The three most recent release tags are v6.0.1 on 2024-02-04, v7.0.0 on 2024-02-16 at 02:19:19 and v7.1.0 on the same date at 02:19:44, twenty five seconds apart. The default branch was last pushed on 2026-06-25.

So five minor versions have shipped to the registry since the last tag was cut, and the branch has moved two and a half years past it. Nothing is broken by this, but it changes how the release list reads: it is a record of when tagging happened, not of what the crate has become. Anyone pinning by tag is pinning something considerably older than the version their lockfile resolves.

The manifest version and the tags also disagree about cadence rather than about content, which is worth knowing before drawing conclusions from either.

The same feature warning is printed twice

The note about the fancy feature appears in full twice in the documentation, once in the About section and again in the section on `main()`.

It says you must enable the `"fancy"` crate feature to get the fancy report output shown in the screenshots, and that you should only do it in your top level crate, because the fancy feature pulls in a number of dependencies that libraries and such might not want.

The advice is correct and the repetition is a symptom of something. The tree contains a `README.tpl` template next to the generated readme, along with a changelog configuration and a task runner manifest in TOML form rather than a Makefile. The document is assembled from a template with sections injected, so the same block appears wherever the template decides to include it.

That has a practical consequence for anyone editing the documentation: changing one copy of the note leaves the other in place, and neither copy carries a marker saying which one is generated.

Screen reader support is gated on the no colour variable

One bullet in the list of what the default report handler does reads oddly, and it is worth quoting rather than paraphrasing.

Screen reader and braille support, gated on `NO_COLOR`, and other heuristics.

`NO_COLOR` is the convention for signalling that colour output should be disabled. Braille glyphs are how a graphical report is made legible to a screen reader, so the accessibility path is described as depending on the environment variable that asks for less decoration. Whether that is a deliberate design or a phrasing slip, the file does not say, and it is the kind of detail that matters to exactly the people the feature is for.

The same handler also turns diagnostic codes into hyperlinks in terminals known to support them, which is the other place where terminal capability detection shows up in the output rather than in configuration.

Three dependencies are mandatory and everything else is optional

The dependency list is short enough to copy out.

toml
[dependencies]
miette-derive = { path = "miette-derive", version = "=7.6.0", optional = true }
unicode-width = "0.2.0"
cfg-if = "1.0.0"

Three entries, and only two are unconditional: a character width table and a conditional compilation helper. The derive macro is optional too, and it is a path dependency on a subdirectory in the same repository.

Everything the pretty output needs sits behind features: a colour library, a line wrapper, three separate terminal capability crates for hyperlinks, colour and unicode, a terminal size probe, a backtrace crate and its extension, serde, and a syntax highlighter. The feature table makes the split explicit, with a base fancy feature that pulls only colour and wrapping.

That is the shape of a library that takes the accessibility warning seriously, and it is why the documentation insists the feature belongs in a top level crate rather than in a dependency.

The block labelled for eyre is not eyre

The development dependency list carries a comment that no longer describes what is under it.

toml
# Eyre devdeps
futures = { version = "0.3", default-features = false }
indenter = "0.3.3"
rustversion = "1.0"
trybuild = { version = "1.0.89", features = ["diff"] }

None of those are eyre. They are the parts of a test harness: a compile-fail test runner, an indentation helper for building expected output, a version attribute helper, a parser for derive macro tests, a regular expression engine, a futures executor, and a tool for stripping escape sequences out of rendered output so it can be compared as text.

So the label is a leftover from when these tests were borrowed from another error library, and the block now serves the suite in front of you rather than anything it names. It is harmless at build time and actively misleading for anyone auditing what the test suite depends on.

The two dependencies above that comment are the ordinary ones: a derive library for the error types in the examples and a version parser used by them.

Edition 2018 with a compiler floor of 1.82

Those two lines sit four lines apart and pull in opposite directions.

The edition is 2018, the oldest edition Rust still supports, while the declared minimum compiler is 1.82.0, which is recent. A crate can stay on an old edition and still require a new compiler; the edition governs which language features are available, not which compiler will accept the manifest.

The practical effect is that the edition choice does nothing for you here. If the 2018 edition were chosen to widen compatibility, the compiler floor cancels it, because nobody on a compiler old enough to benefit from that edition can build the crate at all. If the edition is simply left at its original value, the compiler floor has been raised on its own, which is the more common story and matches the rest of the manifest.

Nothing in the file discusses the choice, so this is an observation about the manifest rather than a claim about intent.

Wrapping a diagnostic without transparent drops its labels

The library guidance has one sharp edge, and the file states it in a comment attached to the attribute.

rust
#[error(transparent)]
// Use `#[diagnostic(transparent)]` to wrap another [`Diagnostic`]. You won't see labels otherwise
#[diagnostic(transparent)]
AnotherError(#[from] AnotherError),

Two attributes for the same variant: the standard one that forwards the display and source, and the miette one. Leave the second off and the wrapped type is still a diagnostic, the code still resolves, the report still renders, and every label on the inner error disappears. No warning, no compile error.

That is the kind of omission that surfaces as a support question rather than a bug report, because nothing is broken from the compiler's point of view.

The surrounding advice is otherwise conservative and worth following in a library: wrap external error types in your own enum rather than returning a report type from a public API, so that consumers who have never heard of this library can still use your errors as ordinary standard errors.

Editorial conclusion

miette suits a library author who wants error types that stay usable as plain standard error types for consumers who do not want the rendering machinery, and that design holds up: three mandatory dependencies and everything else behind a feature. Two things to check before depending on it. First, versioning is opaque from outside, because the manifest carries 7.6.0 while the newest published release tag is 7.1.0, so a crash report that cites a tag tells you less than it appears to. Second, take the warning in the documentation seriously and enable the fancy feature only in your top level crate, since that is where the terminal capability detection, colour, wrapping and backtrace dependencies belong.

Frequently asked questions

What is the miette crate for?

It is a diagnostic reporting library for Rust. Error types derive a Diagnostic trait, and a bundled handler renders them with source snippets, labels, highlighted ranges, help text, severity levels, cause chains and error codes that become hyperlinks in terminals that support them. Error codes are unique per diagnostic and can carry a URL pointing at documentation for that code.

How do I add miette to a Rust project?

Run cargo add miette. If you want the graphical output shown in the project's own examples, add it again with the fancy feature, cargo add miette --features fancy. The documentation is explicit that the fancy feature belongs only in your top level crate, because it pulls in colour, wrapping, terminal detection, backtrace and syntax highlighting dependencies that a library should not impose on its consumers.

Does miette work with thiserror and anyhow?

With thiserror, it integrates smoothly and the derive macro is the recommended way to define error types, though it is not required because the trait can be implemented directly. For anyhow and eyre users it ships replacements: a Result alias, a Report type, a miette macro alongside bail and ensure, an IntoDiagnostic conversion for ordinary standard errors, and Context and WrapErr traits for adding context messages.

Is miette usable inside a library?

That is the design centre of the crate. Its error types are fully usable by consumers who have never heard of it, because they implement the standard error trait, and only three dependencies are mandatory. The one thing to watch is the diagnostic transparent attribute: use it when wrapping another diagnostic, or the inner error's labels will not be rendered.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. zkat/miette on GitHub
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.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/zkat-miette.svg)](https://hysenlabs.com/projects/zkat-miette)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/zkat-miette.svg)](https://hysenlabs.com/projects/zkat-miette)

Was this useful?