Write it once.
Run it everywhere.
Lazuli is a Rust UI framework based on Solid 2.0. One app runs in the browser, on the desktop and on mobile.
Early and unreleased: nothing is on crates.io yet.
use lazuli::{signal, view, Value, R};
pub fn app() -> R<Value> {
let count = signal(0);
view! {
<div class="counter">
<span>"count: " {count}</span>
<button on:click={move |_| count.update(|c| *c += 1)}>
"+1"
</button>
</div>
}
}Solid's reactivity, in Rust
Signals, memos, effects, stores and async values, ported close to Solid 2.0's source. Solid's own test suite runs against Lazuli's JavaScript build.
One app, every platform
The browser, through Limonite; macOS, iOS and Android in the platform's webview; and Blitz, a native renderer, on the desktop.
Platforms in the code
Mark an element or a page for some platforms only, and check at run time what a device supports, so a part of an app exists only where it works.
Full-stack
A router, server functions, server rendering with hydration, data loaded with the page, code splitting, #[wasm] functions, and installable web apps.
Styles without Node
Tailwind CSS and daisyUI, pinned in Cargo.toml and fetched with checksums: one stylesheet for every platform, with ios:, mobile: and web: variants.
A CLI
lazuli serve --watch rebuilds and reloads; lazuli run --platform ios starts the app in the simulator; source maps take DevTools back to your Rust.
Built on Limonite
In the browser, Lazuli apps are compiled to JavaScript by Limonite, a Rust to JavaScript compiler that keeps Rust's behaviour.
About Limonite