squark
Virtual DOM implemention and definitions of Application and Runtime.
Fertures
This repository includes
- Pure Rust virtual DOM implemention
- Definition of application inspired from HyperApp
- Definition of runtime to handle diffirence of virtual DOM
- Runtime implementions for several platforms
- For web browser by using wasm-bindgen
- Server side rendering within Rustic world (now working)
- Macros like a JSX to help writing view
Currently, we depend on nightly
channel
squark-macros
Crate that providing JSX like macro by proc_marco
and pest parser.
Syntax
view! {
<button class="some-class" onclick={ |_| Some(Action::Submit) }>
Button!
</button>
}
We can generate native Rust expression at compile-time.
squark-web
Runtime implemention for web browser with usinng wasm-bindgen.
Here is full example of counter app!
extern crate squark;
extern crate squark_macros;
extern crate squark_web;
extern crate wasm_bindgen;
extern crate web_sys;
use ;
use view;
use WebRuntime;
use *;
use window;
;
Project dir is located at examples/counter.
There is also available TodoMVC example at examples/todomvc and working on https://rail44.github.io/squark/.