2 ms·
Rust doesn’t have regular straightforward CTFE (though I’ll admit freely it’d be nice to have), but it does have compile-time procedural macros, so that I can w
by chrismorgan 12y ago
Rust doesn’t have regular straightforward CTFE (though I’ll admit freely it’d be nice to have), but it does have compile-time procedural macros, so that I can write a simple macro which will take HTML tokens in some DSL or as a string and with the help of the html5ever crate (which can be loaded as a dependency of this compiler plugin as well as of the resulting binary), produce the final tree, or for that matter do anything else with it that I like.
- dom96 12y agoNimrod has that too and as far as I know it's a lot more straightforward to use in Nimrod than it is in Rust.