Expand description
Spytial is a drop-in replacement for std::dbg! that opens an
interactive diagram of Rust values in the browser.
The crate-level entry points are dbg! (a strict superset of
std::dbg!) and diagram (no stderr, doesn’t move). Both work on any
type that derives std::fmt::Debug, serde::Serialize, and
SpytialDecorators.
Start with the guide at https://sidprasad.github.io/spytial-rust/ for the tutorial, decorator reference, and architecture notes. The README on GitHub has the elevator pitch.
Re-exports§
pub use export::export_json_instance;pub use reify::from_datum;pub use reify::from_datum_root;pub use reify::replit;pub use reify::replit_root;pub use reify::ReifyError;
Modules§
- export
- Serde-driven export of Rust values into the relational
jsondatashape. Serialize Rust values into the atom/relation form the visualizer consumes (JsonDataInstance). - jsondata
- Serializable atom/relation data model consumed by spytial-core.
Relational JSON data model produced by
crate::export_json_instance. - reify
- Reconstruct Rust values from the relational
jsondatashape (inverse ofexport). Reconstructing Rust values from the relationaljsondatashape — the inverse ofcrate::export. - spytial_
annotations - SpyTial decorator types, derive-macro runtime, and YAML serialization.
Macros§
- dbg
- Strict superset of
std::dbg!: prints theDebugrepresentation to stderr and opens an interactive diagram of the value in your browser.
Functions§
- diagram
- Render
valueas an interactive diagram and open it in the browser. - diagram_
with_ spec - Like
diagram, but rendersvalueagainst a caller-supplied SpyTial spec instead of the decorators collected from the type.
Derive Macros§
- Spytial
Decorators - Derive
HasSpytialDecorators, turning a type’s spatial-annotation attributes into a singledecorators()impl that also pulls in the decorators of nested field types.