Learn

Build a small app with Aster

Five short chapters, from a native window to a Rust scene in a browser canvas. Each one is a complete, compile-checked example.

These five tutorials start with a native window and finish with a Rust scene in a browser canvas. Run commands from the repository root unless a step changes directory.

  1. Hello window
  2. Layout and text
  3. Forms, input and accessibility
  4. Animation
  5. WebAssembly and the web

You need a Rust toolchain supporting edition 2024, Cargo, and the repository's tracked assets and bundled fonts. Use the project's toolchain policy if your checkout supplies one. Keep Cargo.lock: commands below use --locked. The first native build needs access to the package registry or a prepared cache. Native examples use the native/ workspace and its existing winit/softbuffer host. Linux needs a working X11 or Wayland desktop plus the platform development libraries required by that host; Windows uses its native window backend. A machine without a display can use each native example's --headless option to write PNGs.

The examples are source files in native/ui-host/examples/tutorial_*.rs and web/aster-web/examples/tutorial_web.rs. Each chapter includes its full example. Compile all four native examples from the repository root:

Shell
cd native
cargo check --locked -p aster-ui-host --example tutorial_hello_window --example tutorial_layout_text --example tutorial_forms_input --example tutorial_animation

The browser chapter has its own target and run commands. These are getting-started examples, not performance benchmarks or production app templates. The form keeps its state in memory; the browser canvas example intentionally exposes only a framebuffer, not a complete accessibility or input bridge.