swon-template

Crates.ioswon-template
lib.rsswon-template
version0.1.0
created_at2025-05-07 02:07:03.475264+00
updated_at2025-05-07 02:07:03.475264+00
descriptionTemplating extension for SWON files
homepagehttps://swon.dev
repositoryhttps://github.com/Hihaheho/swon
max_upload_size
id1663337
size2,130
Ryo Hirayama (ryo33)

documentation

README

swon-template

Templating extension for SWON (SWan Object Notation) files.

A structured and type-safe templating tool for swon.

This crate is still under development and published for name reservation purpose.

Part of the SWON project - a minimalist, schema-friendly format with an algebraic data model that's compatible with JSON.

Design

A template is a normal swon file which using $template extensions.

name.$template.path = .name
name.$type: string

childs.$template.for {
  path = .childs
  map {
    name.$template.if = .childs[].active
    name.$template.path = .childs[].name
    name.$type: string
  }
}
Commit count: 73

cargo fmt