color-debug

Crates.iocolor-debug
lib.rscolor-debug
version0.1.1
created_at2025-02-12 21:28:53.858586+00
updated_at2025-02-12 21:28:53.858586+00
descriptionMonkey-patches Rust's fmt system to make Debug colored
homepage
repositoryhttps://github.com/Kyuuhachi/Color-Debug
max_upload_size
id1553523
size65,487
(Kyuuhachi)

documentation

README

Color-Debug

Monkey-patches fmt machinery to colorize debug output.

example

Limitations

This is of course very hacky, so anything may break in the future. Known limitations include:

  • Struct and tuple names can only be colorized on nightly (requires nightly feature flag).
    • Specifically, derived Debug impls use internal shorthand methods which need to be hooked. If they were not, then manual and derived impls would look different.
  • Derived unit structs/variants are not colorized, as they are just a write_str call.
  • Field names are not colored when using nightly-only field_with.
  • References to integer types are only colorized up to a certain depth, due to inlining.
Commit count: 16

cargo fmt