A3S Docs
A3S GUI

Architecture

The RSX authoring layer, native IR, renderer, command stream, host boundary, and style contract in A3S GUI.

GUI Architecture

A3S GUI is designed to let React developers author native application UI with Rust-style .rsx function components while the runtime renders real native controls instead of HTML in a WebView.

RSX function component source
        -> parse_rsx / ComponentCx hooks
        -> RsxComponent template
        -> CompiledRsxNode
        -> UiFrame protocol
        -> RsxCompilerBridge
        -> Semantic UI tree
        -> A3S Native UI IR
        -> keyed renderer diff engine
        -> native command stream
        -> NativeHost adapter
        -> native events
        -> HostEvent
        -> InteractionState
        -> EventRouter
        -> RSX action ids

Layers

LayerResponsibility
RSX authoringAccept Rust-style .rsx function components with DOM-style props, inline styles, aria-*, data-*, and named event actions.
Native UI IRPreserve roles, labels, values, state, events, metadata, children, accessibility roles, and portable style tokens.
RendererReconcile keyed trees and emit create, update, insert child, remove, and set-root commands.
Native hostApply commands to AppKit, WinUI, GTK, or a headless recording backend.
Event bridgeConvert native input into HostEvent, update portable interaction state, and route to registered RSX action ids.

NativeHost Boundary

Every platform adapter implements the same host operations:

  • create a native widget for a NativeElement
  • update native properties without remounting stable controls
  • insert a native child at a stable index
  • remove a native subtree
  • set the root widget for a window or surface

The renderer owns reconciliation. Platform adapters own native object lifetime, thread affinity, focus integration, accessibility integration, and event delivery. Native hosts and widget drivers are not required to be Send, because real AppKit, WinUI, and GTK handles often belong to a UI thread.

Planning Hosts And Real Hosts

PlatformPlanningHost implements the same NativeHost contract without linking platform SDKs. It records the native widget class, accessibility role, action binding, style tokens, events, and metadata that a real backend must apply.

Real host paths consume the same command stream:

Host pathRole
CommandExecutingHostWraps a platform adapter plus command executor and executes commands immediately.
DriverCommandExecutorShared interpreter for platform commands.
NativeWidgetDriverOS-binding contract for create/update/attach/remove/root operations.
HandleWidgetDriverStores thread-affine native handles returned by a NativeHandleAdapter.
NativeWidgetSurfaceSetter-first contract for direct platform SDK calls.
RecordingBackendPure Rust object tree used for validation and headless tests.

Style Contract

WebProps preserves portable DOM-style props. PortableStyle parses the subset that native adapters can apply deterministically:

  • display and flex direction
  • alignment and justification
  • width, height, min/max sizes
  • gap, padding, and margin
  • foreground and background color
  • border radius
  • opacity

Unsupported style declarations are preserved as author intent so compiler or design tooling can warn without silently dropping information.

Boundary

A3S GUI is not a browser runtime. Portable code should not depend on live DOM access, CSSOM inspection, browser layout measurement, or HTMLElement object identity.

On this page