Skip to main content

Crate mobiler_web

Crate mobiler_web 

Source
Expand description

mobiler-web — Mobiler’s web shell.

Renders any Mobiler app’s Widget tree to the DOM (Leptos / WASM), driving the Rust core via crux’s Core and fulfilling capabilities (HTTP) with the browser’s fetch. The web twin of the generic Android/SwiftUI shells: write your app once as a MobilerApp, then

fn main() { mobiler_web::run::<my_app::App>(); }

renders it on the web — fully styled, no CSS required: the shell ships its own theme (mobiler.css) and injects it on mount, and Scaffold.dark_mode flips the whole theme. Your crate only supplies a minimal index.html with the Trunk entry point; an app may add its own stylesheet to override any widget class.

Traits§

WebApp
What a Mobiler app must be to render on the web: a crux App speaking the fixed ABI (Action in, Widget out, Effect for capabilities). MobilerShell<_> satisfies this automatically.

Functions§

run
Mount a Mobiler app into the document body. Call from your wasm main.