bin+lib maomi-tools

Strict and Performant Web Application Programming

2 unstable releases

0.5.0 Jul 21, 2024
0.4.0 Mar 19, 2023
Download history 5/week @ 2024-06-28 11/week @ 2024-07-12 154/week @ 2024-07-19 24/week @ 2024-07-26 10/week @ 2024-08-02 10/week @ 2024-08-09 10/week @ 2024-08-16 14/week @ 2024-08-23 22/week @ 2024-08-30 2/week @ 2024-09-06 28/week @ 2024-09-13 29/week @ 2024-09-20 20/week @ 2024-09-27 10/week @ 2024-10-04 8/week @ 2024-10-11

71 downloads per month
Used in 6 crates (3 directly)

MIT license

13KB
313 lines

maomi

maomi

Strict and Performant Web Application Programming

crates.io docs.rs build-status

#[component]
struct HelloWorld {
    template: template! {
        "Hello world!"
    }
}

Key Features

  • Write rust code, compile to WebAssembly, and run in browser.
  • Great overall performance and no common performance pitfalls.
  • Reports mistakes while compilation.
  • With rust-analyzer installed, easier to investigate elements, properties, and even style classes.
  • Based on templates and data bindings.
  • Limited stylesheet syntax, easier to investigate.
  • High performance server side rendering.
  • I18n in the core design.

Checkout the website for details.

中文版站点 了解详情。

Examples

See dom-template for the basic example. Compile with:

wasm-pack build maomi-dom-template --target no-modules

Run Tests

General rust tests and wasm-pack tests are both needed.

cargo test
wasm-pack test --firefox maomi-dom # or --chrome

Dependencies

~1.5–2.3MB
~44K SLoC