amenui
en·中 github ↗ v0.0.1
01docs 02components 03lab 04works
en·中github ↗
×

docs / start / project structure docs / start /

Project structure

01.4
On this page ▾
  1. The runtime
  2. Drawing
  3. Components and tools

Where things are in the amenui repository. The crate is one library with a few command-line tools; this site, its gallery and the Lab live in a separate repository, amenui-dev/website, which depends on amenui like any application would.

The runtime

WhereWhat
src/el.rsthe element tree and its builders
src/ui.rsthe runtime: layout, input, focus, scrolling, animation
src/app/opening a window: native.rs (winit, AccessKit in access.rs) and web.rs (a canvas)
src/style.rs, src/preset.rslooks, themes and presets as data
src/i18n.rs, assets/i18n/languages and message catalogs
src/text.rs, assets/text shaping and the bundled faces
src/tree.rs, src/drive.rs, src/audit.rsthe laid-out tree as data, driving a page from outside, and the audit

Drawing

WhereWhat
src/scene.rs, src/render.rswhat is drawn, and the wgpu renderer that draws it
src/shader.wgslthe drawing passes: instances, material, annotation
src/materials/*.wgslone material each (plain, dottr, halftonr…)
src/mesh.wgsl, src/particles.wgsl, src/sim_cs.wgsl3D objects, particles and the compute pass that moves them
src/offscreen.rsrendering without a window, for the tools and tests

Components and tools

WhereWhat
src/widgets/the components, one file each
registry.jsonthe component registry that amenui add reads
examples/the recipes, small complete applications
src/bin/amenui (add components to a project), render and sheet
web/the JavaScript side of the web build
docs/DESIGN.mdthe design contract
tests/the test suite