-
Notifications
You must be signed in to change notification settings - Fork 166
Description
Love the library, it's really nice!
This would add an optional feature that allows maud to embed a runtime parser/interpreter that can read its own macro block from Rust source code. This runtime templating is limited in scope, meaning that changes to data, bindings, etc will require a recompile, but other changes could be done by interpreting the macro block at runtime (which IMO covers a lot of iteration time). This is definitely a bigger task with multiple steps, but I think it can be a really useful feature.
This is something Dioxus has implemented as a CLI tool, and I made a proof-of-concept implementation html_hotreload! (renamed to html! in the video) macro that uses maud's parser to generate a runtime instead that also parses itself at runtime (inception...).
maud_hotreload.mp4
Is this something you'd be interested in including with maud as an optional feature, or is it out of scope for maud? I think it could be it's own crate with a small refactor to expose maud's proc-macro/parser internals.
Either way, thanks for the useful library!