11<p align =" center " >
2- <img src =" ./assets/readme/hero.svg " width =" 100% " alt =" A3S GUI turns semantic Rust RSX into deterministic layout records and retained A3S Graphics scenes " >
2+ <img src =" ./assets/readme/hero.svg " width =" 100% " alt =" A3S GUI converges Rust RSX and planned TSX authoring into one native semantic, layout, interaction, accessibility, and Graphics pipeline " >
33</p >
44
55<p align =" center " >
66 <a href =" https://github.com/A3S-Lab/GUI/actions/workflows/ci.yml " ><img alt =" CI status " src =" https://github.com/A3S-Lab/GUI/actions/workflows/ci.yml/badge.svg " ></a >
77 <img alt =" Rust 1.95.0 " src =" https://img.shields.io/badge/Rust-1.95.0-2F3945?style=flat-square&logo=rust&logoColor=white " >
88 <img alt =" Roadmap milestone M3 current " src =" https://img.shields.io/badge/roadmap-M3%20current-0067C0?style=flat-square " >
9+ <img alt =" TSX architecture milestone T0 proposed " src =" https://img.shields.io/badge/TSX-T0%20proposed-1687D9?style=flat-square " >
910 <a href =" LICENSE " ><img alt =" MIT license " src =" https://img.shields.io/badge/license-MIT-2F3945?style=flat-square " ></a >
1011</p >
1112
12- ** A3S GUI** is a Rust-native, cross-platform runtime for reducer-driven
13- components and structured RSX. One semantic ` NativeElement ` tree feeds layout,
14- interaction, accessibility, and an A3S-owned rendering path—without a DOM,
15- CSSOM, WebView, JavaScript object graph , or framework-owned content renderer.
13+ ** A3S GUI** is a Rust-native, cross-platform semantic UI and rendering runtime.
14+ Rust RSX is available today; a planned ` @a3s/gui ` automatic JSX runtime will
15+ let standard TSX executed by Node or Nub feed the same native pipeline. Neither
16+ path uses a DOM, CSSOM, WebView , or framework-owned content renderer.
1617
1718> [ !IMPORTANT]
1819> The repository is in its P0 renderer migration. The semantic runtime and
1920> AppKit/GTK4/WinUI control hosts are established dogfood baselines. The first
2021> generic self-drawn layout-to-Scene slice has landed; self-drawn text, input,
2122> IME, accessibility bridges, and real thin-host presentation remain roadmap
22- > work.
23+ > work. The TSX runtime, local host session, and npm packages are architecture
24+ > only and have not been implemented yet.
2325
2426## One tree, measured end to end
2527
@@ -45,7 +47,54 @@ The GPU result is local DX12 evidence, not a Metal/Vulkan parity claim. Text and
4547real self-drawn window presentation are not represented by the screenshot
4648above.
4749
48- ## Quick start
50+ ## TSX to native, without a browser
51+
52+ The proposed TypeScript path follows
53+ [ Nub] ( https://github.com/nubjs/nub ) 's strongest runtime idea: keep stock Node,
54+ transform ` .tsx ` through its normal loader pipeline, and let a narrow Rust
55+ boundary own native work. A3S adds a standard automatic JSX runtime and a
56+ supervised native host; it does not fork Nub or add another TSX compiler.
57+
58+ ``` text
59+ app.tsx -> Nub / Node -> @a3s/gui/jsx-runtime -> versioned UI frame
60+ |
61+ v
62+ Rust native host
63+ |
64+ NativeElement -> layout -> Graphics -> OS window
65+ |
66+ v
67+ ordered actions -> TypeScript callbacks
68+ ```
69+
70+ The intended API is ordinary TSX:
71+
72+ ``` tsx
73+ import { Button , Text , View , Window , createApp , useState } from " @a3s/gui" ;
74+
75+ function Counter() {
76+ const [count, setCount] = useState (0 );
77+ return (
78+ <Window title = " Counter" width = { 360 } height = { 220 } >
79+ <View className = " flex-col gap-4 p-6" >
80+ <Text >Count: { count } </Text >
81+ <Button onPress = { () => setCount ((value ) => value + 1 )} >Increment</Button >
82+ </View >
83+ </Window >
84+ );
85+ }
86+
87+ await createApp (Counter ).run ();
88+ ```
89+
90+ This sample documents the target API; it is not runnable yet. The proposed
91+ design keeps component state and callbacks in Node, keeps platform/GPU handles
92+ inside a separate Rust process, reuses resolved ` ProtocolUiFrameV1 ` records,
93+ and sends complete frames so Rust remains the only native reconciler. Read the
94+ [ TSX native runtime architecture] ( docs/tsx-native-runtime.md ) for protocol,
95+ identity, failure recovery, packaging, and T0-T5 delivery gates.
96+
97+ ## Quick start: Rust RSX today
4998
5099The crate is currently consumed from Git:
51100
@@ -101,31 +150,33 @@ just playground
101150## Architecture
102151
103152``` text
104- ComponentCx function / .rsx module
105- |
106- v
107- CompiledRsxNode
108- |
153+ Rust ComponentCx / .rsx planned TSX in Node / Nub
154+ | |
155+ | @a3s/gui/jsx-runtime
156+ | |
157+ +--------------+---------------+
158+ |
159+ v
160+ resolved versioned UI frame
161+ |
162+ v
163+ NativeElement tree
164+ / | \
165+ v v v
166+ LayoutSnapshot semantics interaction + hit regions
167+ | + a11y
109168 v
110- versioned UiFrame protocol
169+ A3S Graphics Scene
111170 |
112171 v
113- NativeElement tree
114- / | \
115- v v v
116- LayoutSnapshot semantics interaction + hit regions
117- | + a11y
118- v
119- A3S Graphics Scene
120- |
121- v
122- FramePlanner -> software reference / wgpu
123- |
124- Metal / DX12 / Vulkan
125- |
126- thin platform host
127- |
128- normalized events -> reducers
172+ FramePlanner -> software reference / wgpu
173+ |
174+ Metal / DX12 / Vulkan
175+ |
176+ thin platform host
177+ |
178+ normalized events -> Rust reducers
179+ or TSX callbacks
129180```
130181
131182These products share stable element identity, but they stay separate. Paint
@@ -134,7 +185,7 @@ action from a colored rectangle.
134185
135186| Layer | Owns | Does not own |
136187| --- | --- | --- |
137- | Authoring and design system | Rust components, RSX, typed props, contracts, variants, and tokens | GPU resources, native handles, product workflows |
188+ | Authoring and design system | Rust components and RSX today; planned Node-owned TSX components and hooks; typed props, contracts, variants, and tokens | GPU resources, native handles, layout truth, product workflows inside GUI core |
138189| Semantic runtime | ` NativeElement ` , reducers, actions, interaction, focus, selection, overlays, i18n, capabilities, and accessibility | Graphics devices, toolkit state, product I/O |
139190| Layout and scene adapter | Portable style resolution, quantized boxes, paint extraction, hit regions, diffs, and diagnostics | Product state, OS widget geometry, backend-specific GPU calls |
140191| [ A3S Graphics] ( https://github.com/A3S-Lab/Graphics ) | Scene schema, stable draw identity, retained damage, preparation, software rasterization, shaders, and GPU rendering | RSX, widgets, accessibility, IME, windows |
@@ -192,6 +243,7 @@ independently.
192243| M3 · Layout and Scene | Current | Generic calculator rectangle slice landed; full flex, stacking, redraw scheduling, cross-platform fingerprints, and thin-host presentation remain |
193244| M4 · Text and interaction cutover | Planned | Shaping, glyphs, GUI-owned input, IME, accessibility bridges, overlays, and complete calculator scenarios |
194245| M5 · Default cutover | Planned | Make self-drawn content the default, then delete the three legacy widget renderers |
246+ | T0-T5 · TSX native authoring | Proposed | Automatic JSX runtime, versioned Node-to-host session, state/event runtime, self-drawn native window, packages, and stable SDK |
195247
196248The dependency-ordered plan and acceptance gates are in the
197249[ delivery roadmap] ( docs/roadmap.md ) .
@@ -328,6 +380,7 @@ packaging/ unsigned native smoke-bundle assets and validators
328380- [ Renderer field inventory] ( docs/renderer-field-inventory.md )
329381- [ RSX language and hooks] ( docs/rsx.md )
330382- [ RSX framework plan] ( docs/rsx-framework.md )
383+ - [ TSX to native runtime architecture] ( docs/tsx-native-runtime.md )
331384- [ Native style contract] ( docs/style-contract.md )
332385- [ React Aria native direction] ( docs/react-aria-native.md )
333386- [ Native app shell] ( docs/app-shell.md )
0 commit comments