Post

We have a new release (v0.4.0) that types every format-declared lexicon field at the Rust boundary, adds Datetime and Uri typed wrappers, and disambiguates crate-root re-exports when two records under different parents share a leaf TypeName.

github.comRelease v0.4.0 · idiolect-dev/idiolectAdded idiolect_records::Datetime and idiolect_records::Uri typed newtypes alongside the v0.3.0 Nsid, AtUri, and Did. Each validates at parse time (time::OffsetDateTime for RFC 3339, url::Url for U...

Lexicon fields with a format declaration now emit as the format's typed wrapper: - "at-uri" -> AtUri - "did" -> Did, - "datetime" -> Datetime - "uri" -> Uri - "nsid" -> Nsid Previously every format collapsed to String.

0 reposts0 likes

Datetime and Uri are new newtypes alongside the v0.3.0 Nsid, AtUri, Did. Datetime validates RFC 3339 via time::OffsetDateTime; Uri validates via url::Url. Both expose Deref<Target=str> and the full FromStr-Display-serde trait surface.

When two records under different parent namespaces share a leaf TypeName–e.g. changelog::Entry vs resource::Entry–idiolect-codegen walks each path up until each member's prefix is unique within the colliding group and aliases–e.g. ChangelogEntry and ResourceEntry.