About

moxie (/ˈmäksē/) is a lightweight platform-agnostic UI runtime written in Rust, powering a strongly-typed declarative programming style with minimal interaction latency.

moxie is principally inspired by React and more specifically the recent Hooks API. It aims to smoothly bridge the gap between stateless tools like dear imgui and "traditional" UI paradigms with manually managed graphs of stateful, mutable objects. There are many interesting parallels in our design to those of recently announced UI frameworks Jetpack Compose and SwiftUI, although a more in-depth comparison hasn't yet been made. Also, in the course of looking for prior art (ahem googling "memoized imgui"), I found a very interesting thread on LtU discussing various commenters' efforts and curiosities -- it's a fun read.

Hands On

Want to try things out? Check out the development requirements, and run these commands in two terminals:

$ cargo dom-flow

This will build all of the web examples and watch for local changes.

$ cargo server

This will start an HTTP server for the static files in the repo, and opens the repo directory in a browser.

Take a look at .cargo/config for other subcommand aliases used in the project.


random:

Declarative style

TODO "imperative but idempotent"

"describe the UI right now"

partition the render space using function calls

while managing persistent stateful elements

with minimal incremental updates

in order to achieve minimal latency and consistent responsiveness

  • project values
    • empathy
    • respect
    • sharing
    • dialogue

TODO

  • moxie-dom
    • getting started, examples
    • creating elements
    • mounting elements
    • element attributes
    • element event handling
    • use of call slots

Adding new targets

TODO

TODO

TODO