#serialization #reflection #diff #facet

facet-diff-core

Core types and helpers for diff rendering in Facet

14 releases (8 breaking)

Uses new Rust 2024

0.43.2 Jan 23, 2026
0.42.0 Jan 6, 2026
0.41.0 Dec 31, 2025

#74 in #facet

Download history 87/week @ 2025-12-08 38/week @ 2025-12-15 22/week @ 2025-12-29 36/week @ 2026-01-05 38/week @ 2026-01-12 87/week @ 2026-01-19 62/week @ 2026-01-26

231 downloads per month
Used in 5 crates (4 directly)

MIT/Apache and GPL-3.0 licenses

2MB
36K SLoC

facet-diff-core

Coverage Status crates.io documentation MIT/Apache-2.0 licensed Discord

{{crate}}

Core types and helpers for diff rendering in Facet.

This crate provides shared infrastructure for rendering diffs across different serialization formats (XML, JSON, TOML, etc.).

Symbols

Symbol Meaning Color
- Deleted Red
+ Inserted Green
Moved from here Blue
Moved to here Blue

Value-only coloring

Keys/field names stay neutral, only the changed VALUES are colored:

- fill="red"    <- "red" is red, "fill=" is white
+ fill="blue"   <- "blue" is green, "fill=" is white

Usage

This crate is typically used by serializers (facet-xml, facet-json, etc.) to render diffs consistently. You probably want to use facet-diff directly instead of this crate.

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

AWS Zed Depot

...without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.

Dependencies

~9–14MB
~174K SLoC