declarative
A proc-macro library for creating complex reactive views declaratively and quickly.
To use it, add to your Cargo.toml:
[]
= '0.2'
# for a custom builder mode:
= ['builder-mode']
# if you're going to use it with gtk-rs, you might want to:
= ['gtk-rs'] # gives a suitable `builder_mode!` macro
To learn how to use this macro, it is best to clone this repository, read the source code of the examples in alphabetical order and run them like this:
The examples depend on gtk-rs, so you should familiarize yourself with gtk-rs a bit before:
https://gtk-rs.org/gtk4-rs/stable/latest/book/
You may need to tell rust-analyzer that the examples depend on the gtk-rs feature to avoid false positives.
For example, with VS Code it is configured with the following JSON:
Application example
In the following I manually implement the Elm pattern. The macro does not require any specific pattern.

use ;
use ;
use send;
To execute, run:
License
Licensed under either of
- Apache License, Version 2.0 (Apache-2.0.txt or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (MIT.txt or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.