4 releases (breaking)

0.5.0 Jul 21, 2024
0.4.0 Mar 19, 2023
0.3.0 Sep 4, 2021
0.1.0 Jan 1, 2020

#233 in HTTP server


Used in 2 crates

MIT license

160KB
3.5K SLoC

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

lib.rs:

maomi: a rust framework for building pages with components

maomi is a framework for building (web) application user interface. It has strict compile-time check and generates fast code.

This is the core module of the framework. In browsers, the maomi-dom crate is also needed. See the maomi_dom crate document for a quick start.

Dependencies

~1.6–2.4MB
~47K SLoC