Hirola is a declarative frontend framework that is focused on simplicity and reactivity.
We are going to create a simple counter program.
bash
cargo new counter
With a new project, we need to create an index file which is the entry point and required by trunk
bash
cd counter
Create an index.html
in the root of counter. Add the contents below
html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hirola Counter</title>
<body></body>
</head>
</html>
Lets add some code to src/main.rs
```rust,no_run use hirola::prelude::*; use hirola::signal::Mutable;
fn counter() -> Dom { let count = Mutable::new(0i32); let decrement = count.callback(|s| *s.lockmut() -= 1); let increment = count.callback(|s| *s.lockmut() += 1); html! { <> {count} > } } fn main() { let root = render(counter()).unwrap(); std::mem::forget(root); } ```
Now lets run our project
bash
trunk serve
Check out Hirola Docs written with Hirola itself!
Here are some extensions for hirola:
| Status | Goal | Labels |
| :----: | :--------------------------------- | --------- |
| ✔ | Basic templating with rust and rsx | ready
|
| ✔ | Extend functionality with mixins | ready
|
| ✔ | Components | ready
|
| ✔ | SSR | ready
|
| ✔ | Signals | ready
|
| 🚧 | Form management | started
|
| ⏳ | Markdown templating | pending
|
| 🚧 | Styling | started
|
| ⏳ | SSG | pending
|