Skip to content

elcoosp

Blog1 min read
1 post by elcoosp

One reactive core across five Rust UI frameworks

In the Rust UI ecosystem, choosing a rendering toolkit usually means rewriting your entire state layer. Signals, effects, async task cancellation, and context propagation all use incompatible traits across GPUI, Leptos, Dioxus, Xilem, and Floem.

We built quoin (0.1) so you can write reactive business logic once against a single trait surface and compile it onto any of those five backends.

We wanted a framework-agnostic reactive abstraction layer where application state, async loaders, and reusable hooks compile cleanly under a single selected backend feature flag—and where every adapter passes the same behavioral conformance suite.

quoin splits its reactive contract (quoin-core) from backend adapters. You enable exactly one framework feature at compile time, mapping Quoin’s signals, memos, effects, and cancellation tokens onto the host framework’s native reactive runtime.

Unified Reactive Traits

Signals, derived memos, side effects, async tasks, cancellation, and global state live behind one portable ReactiveContext API.

Five Native Backends

Compile-time feature flags target GPUI, Leptos, Dioxus, Xilem, or Floem without runtime dynamic-dispatch overhead across widgets.

Backend Parity Suite

A shared conformance test suite runs against every adapter to catch subtle differences in effect scheduling, batching, and cleanup order.

Foundation for Higher Crates

Powers cross-framework libraries like rs-query, navi, nexum, and takumi-motion without duplicating adapter boilerplate.

The hardest part of unifying five reactive runtimes isn’t basic signal reads—it is disposal order, batching boundaries, and async task cancellation when a component unmounts mid-flight. Bridging push-based and pull-based reactivity models required strict scheduling rules in the conformance suite so effects don’t fire twice on one backend and zero times on another.

[dependencies]
quoin = { version = "0.1", features = ["gpui"] }

Follow the cross-framework counter tutorial to write a portable counter hook and run it across different UI backends.