knurdy

Crates.ioknurdy
lib.rsknurdy
version0.2.0
sourcesrc
created_at2022-09-30 18:26:33.680414
updated_at2023-07-25 20:34:44.402459
descriptionMinimal, opinionated KDL deserialization with Serde
homepage
repositoryhttps://www.github.com/gamma-delta/knurdy
max_upload_size
id677453
size32,948
petrak@ (gamma-delta)

documentation

README

Knurdy

A minimal, low-copy, very opinionated conversion layer from the kdl library to serde.

This is mainly intended for Dialga, my crate for a Caves of Qud-like blueprint instatiation system, which in turn is intended for Palkia.

There were shortcomings for me with all the extant KDL libraries for Rust:

  • Knuffel is very powerful, but rolls its own deserialization system and macros instead of using Serde. (Which is appropriate for what it's trying to do, granted; KDL doesn't map all too well to Serde's data model.) It stores the AST in memory, but requires also storing the span of text it was parsed from, and I wanted just pure ASTs sitting around.
  • Kaydle is a KDL library that uses Serde, but isn't as feature-complete as Knuffel and doesn't store the AST in memory.

Usage

Call knurdy::deserialize_node, or directly use the KdlNodeDeser.

Commit count: 0

cargo fmt