sauron
One crate to rule the DOM
One crate to mind it
One crate to bring JSON
And in the Rust code bind it
This code, no other, is made by code elves
Who'd pawn parent process to get it themselves
Ruler of net troll and mortal and hacker
This code is a lib crate for Patreon backers
If trashed or buggy it cannot be remade
If found send to Ivan, the bandwidth is prepaid
-- The Harvard Lampoon & po8
Sauron is an html web framework for building web-apps with the goal of closely adhering to The Elm Architecture, a paragon for elegant design.
As with elm, sauron follows the simplistic design of writing view code.
Example
use *;
use *;
use *;
index.html
Minimal sauron app
In Cargo.toml, specify the crate-type to be cdylib
[]
= ["cdylib"]
Note: You need to use the nightly compiler with minimum version: rustc 1.37.0-nightly (17e62f77f 2019-07-01)
Build using
Look at the examples and the build script for the details.
Demo examples
- todomvc
- data-viewer - A resizable spreadsheet csv data viewer
- svg_clock - A clock drawn using svg and window tick event.
- svg_graph - A simple graph using svg
Convert html to sauron syntax
html2sauron - A tool to easily convert html into sauron node tree for your views.
Prerequisite:
Warning: I repeat, You need to use the latest nightly compiler in order for this to work.
Performance:
Please support this project:
License: MIT