1 unstable release

new 0.1.0 Jan 24, 2025

#264 in Procedural macros

Download history 109/week @ 2025-01-22

109 downloads per month
Used in 5 crates (2 directly)

MIT license

165KB
4K SLoC

Parser for GenUI

See: GenUI Book

See: GenUI


lib.rs:

Convert Gen DSL to AST

How to convert

                                                   Real AST
-----------       ---------------   Strategy   ---------------
| Gen DSL |  -->  | ParseTarget |  ----------> | ParseResult |
-----------       ---------------              ---------------  

Gen

  • Template
  • Script
  • Style

Template

  1. Unrestricted tags (tag name is not constrained)
  2. There are no styles, only properties, or in other words, all styles are properties
  3. Nesting strings in tags is not allowed (example: this is a view ❌)

Script

  1. Allow Rust syntax

Style

  1. bind to tag by name
  2. nesting allowed
  3. function and bind allowed

Dependencies

~4–12MB
~132K SLoC