jit-overview
Installation
SKILL.md
JIT deserialization overview (facet-format)
Facet’s JIT lives in facet-format and is used by format crates like facet-json.
When to read this
- You’re touching anything under
facet-format/src/jit/or enabling thejitfeature. - You’re investigating performance changes in deserialization (especially “tier2”/JIT benchmarks).
- You’re debugging a JIT crash (SIGSEGV/UB-ish symptoms).
Mental model
facet-format defines a format-neutral deserialization pipeline:
- A
FormatParser(implemented by each format crate) produces a stream ofParseEvents. - A shape-driven layer consumes those events and writes to an output value (often via
facet-reflect).
The JIT accelerates this by compiling deserialization code specialized for: