#leptos #mobile #cross-platform #wasm-ui

mobiler-web

Mobiler's web shell — renders any Mobiler app's Widget tree to the DOM (Leptos/WASM)

28 breaking releases

0.34.0 Jul 20, 2026
0.32.0 Jul 19, 2026

#2686 in GUI

MIT/Apache

260KB
4K SLoC

mobiler-web

Mobiler's web shell — the same Rust core, rendered to the DOM.

The web twin of Mobiler's generic Android (Jetpack Compose) and iOS (SwiftUI) shells. It drives any MobilerApp's core with Crux, renders its Widget tree to the DOM with Leptos (CSR/WASM), and fulfils the built-in capabilities natively in the browser — write your app once; it runs on the web with one line. Built in:

HTTP, storage, clipboard, share, browser, toast, device info, haptics, a confirm dialog, the photo picker, camera capture, the date picker, and the time picker.

// src/main.rs of a Trunk project
fn main() {
    mobiler_web::run::<my_app::App>();
}
<!-- index.html — that's all the markup you need -->
<!DOCTYPE html>
<html>
  <head><link data-trunk rel="rust" /></head>
  <body></body>
</html>
  • No CSS required. The shell ships its own theme (mobiler.css) and injects it on mount, so run::<App>() renders a fully-styled app. It's injected at the front of <head>, so your own stylesheet (if you add one) overrides any widget class.
  • Theme-as-data. Scaffold.dark_mode flips the whole theme — the web twin of the native shells' preferredColorScheme / Material theme.
  • Complete widget coverage. Every mobiler-ui Widget variant renders (the match is exhaustive, like the native shells), so a core that runs on Android/iOS renders identically on the web — including the charts (bar/line/stacked/pie/donut/rings/gauge + region/coverage), drawn with SVG + CSS here, the video player / web view / PDF viewer, and an interactive map (MapLibre-GL).

Build and serve with Trunk: trunk serve. See the fullstack-todo and coffee demos for working examples (one core, three platforms).

License

Dual-licensed under either MIT or Apache-2.0, at your option.

Dependencies

~37MB
~691K SLoC