#front-end #spa #web #web-apps #user-interface #frontend-framework

macro wal-rsx

A framework for creating client-side single-page apps using Rust

4 releases

0.1.3 Jan 3, 2024
0.1.2 Dec 19, 2023
0.1.1 Dec 17, 2023
0.1.0 Dec 17, 2023

#430 in WebAssembly

MIT/Apache

75KB
1.5K SLoC

Wal-rsx

Wal-rsx is a part of wal project that enables the programmer to define user interface. The user interface could be defined without using this crate, but it is not a recommended approach.

Wal-rsx provide only a single rsx macro. With the usage of this macro you could write HTML like syntax to define user interface:

rsx! {
    <div id="identifier" class="class">
        { 1 + 1 }
    </div>
    <button
        onclick={|event: MouseEvent| {
            println!("I love wal rsx!");
        }}>
        "I love wal rsx!"
    </button>
}

lib.rs:

This crate provides the rsx! procedural macro for writing JSX-like syntax in Rust. This macro is used to define views and behaviors of web application.

Dependencies

~0.4–0.9MB
~20K SLoC