<Just in Time (True) Generative UI Components> Ge...
# share-your-work
m

Just in Time (True) Generative UI Components

Generate interactive UI components in the browser using WebAssembly and a capability-based UI framework Components compile straight to WebAssembly in memory without needing a full programming language toolchain Components execute with zero capabilities by default. The host system provides access to clocks, timers, random numbers and so on Make easy things easy with TutucaScript: a simple event-handling language A non-Turing complete language with no loops, recursion, or function calls Make hard things possible with a real programming language like Moonbit, JavaScript or write some WAX for the bare metal feeling :)
🍰 1
Try the Tutucard Playground: Inspect rendered components and run unit tests and examples live in the browser Review compiled WebAssembly output in WAX or WAT formats Export .tar.gz packages for easy component reuse across projects marianoguerra.github.io/tutuca-moonbit/tutucard
d
Pretty cool. I was doing some work around this a few months ago for https://github.com/dman-os/townframe , a pet thing of mine. My main intended surfaces are native apps and maybe TUI so I couldn't afford to do webtech for embedding components nor could assume it's rich visual expressivity. I went looking for wasm or preferably wasi embedded UI apis but most either gave the component a draw buffer, canvas or expose a very specific framework's programming API.
In the end, I went with a json component inspired IR with the idea being HTML or other rich things can lower to it anyways. Wasm event system can also be wired over the IR.
Being able to store a render result and use it after an indefinite amount of time, possibly on a different or less capable rendered were one of the requirements. HTML is perfect for this but I didn't want to get stuck with DOM semantics or the expectation of one.