Skip to content

Commit 147645c

Browse files
author
Roy Lin
committed
docs: define self-drawn platform host plan
1 parent 97be7d9 commit 147645c

4 files changed

Lines changed: 640 additions & 33 deletions

File tree

README.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ path uses a DOM, CSSOM, WebView, or framework-owned content renderer.
2323
> work. The TSX runtime, local host session, and npm packages are architecture
2424
> only and have not been implemented yet.
2525
26+
The target is unambiguous: A3S draws all application content. The existing
27+
`appkit-native`, `gtk4-native`, and `winui-native` modules create controls only
28+
as frozen migration baselines. The final macOS host keeps AppKit only for the
29+
application/window shell, one custom Metal-backed view, input, IME,
30+
accessibility, and explicit system services. The final Linux host uses
31+
Wayland/X11 without GTK4; the final Windows host uses Win32 without WinUI or
32+
XAML. See the [self-drawn platform host plan](docs/platform-hosts.md).
33+
2634
## One tree, measured end to end
2735

2836
<p align="center">
@@ -170,13 +178,17 @@ Rust ComponentCx / .rsx planned TSX in Node / Nub
170178
|
171179
v
172180
FramePlanner -> software reference / wgpu
173-
|
174-
Metal / DX12 / Vulkan
175-
|
176-
thin platform host
177-
|
178-
normalized events -> Rust reducers
179-
or TSX callbacks
181+
/ | \
182+
v v v
183+
Metal DX12 Vulkan
184+
| | |
185+
v v v
186+
macOS OS shell Win32 Wayland / X11
187+
\ | /
188+
+----------+----------+
189+
|
190+
normalized events -> Rust reducers
191+
or TSX callbacks
180192
```
181193

182194
These products share stable element identity, but they stay separate. Paint
@@ -243,6 +255,7 @@ independently.
243255
| M3 · Layout and Scene | Current | Generic calculator rectangle slice landed; full flex, stacking, redraw scheduling, cross-platform fingerprints, and thin-host presentation remain |
244256
| M4 · Text and interaction cutover | Planned | Shaping, glyphs, GUI-owned input, IME, accessibility bridges, overlays, and complete calculator scenarios |
245257
| M5 · Default cutover | Planned | Make self-drawn content the default, then delete the three legacy widget renderers |
258+
| H0-H5 · Thin platform hosts | Planned | Zero-widget host contract, shared window runtime, Win32/macOS/Wayland-X11 slices, and dependency-audited cutover |
246259
| 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 |
247260

248261
The dependency-ordered plan and acceptance gates are in the
@@ -275,9 +288,12 @@ cargo check --locked --no-default-features --features software-reference --lib
275288
cargo check --locked --no-default-features --features gpu --lib
276289
```
277290

278-
## Platform baseline
291+
## Platform hosts: migration baseline and target
292+
293+
The currently executable native features are migration evidence, not the
294+
renderer destination:
279295

280-
| Host | Feature | Current role |
296+
| Host | Current feature | Current role |
281297
| --- | --- | --- |
282298
| Headless | default `headless` | Protocol tests, reducer flow, command inspection, capability audits, accessibility snapshots, and reference rendering |
283299
| macOS | `appkit-native` | AppKit dogfood/smoke baseline for controls, input, focus, menus, overlays, and accessibility |
@@ -289,6 +305,22 @@ they are not presented as a stable production application framework. Their
289305
application-content widgets remain frozen migration code and will be removed
290306
only after the self-drawn cutover gates pass.
291307

308+
The target hosts expose one top-level window/surface plus OS services. They do
309+
not receive widget create/update/remove commands:
310+
311+
| Host | Target shell and presentation | Forbidden content path |
312+
| --- | --- | --- |
313+
| macOS | AppKit lifecycle, `NSWindow`, one custom `NSView`/`CAMetalLayer`, Metal | AppKit buttons, fields, stacks, or toolkit layout |
314+
| Linux | Wayland + `xdg-shell`, separately gated X11 fallback, Vulkan | GTK4, GDK, GSK, or GTK controls |
315+
| Windows | Win32 `HWND`/message loop, DX12/DXGI presentation | WinUI 3, XAML, or WinUI controls |
316+
317+
Input, IME, accessibility, clipboard, file pickers, permission prompts, and
318+
native window chrome remain OS integration. Layout, text, forms, menus,
319+
popovers, ordinary dialogs, hit testing, and every application-content pixel
320+
remain A3S-owned. The dependency firewall, H0-H5 milestones, and platform
321+
acceptance matrix are specified in the
322+
[platform host architecture](docs/platform-hosts.md).
323+
292324
## Examples
293325

294326
Headless and protocol examples:
@@ -363,6 +395,7 @@ src/
363395
|- drawing/layout_scene.rs
364396
| LayoutSnapshot to Graphics Scene lowering
365397
|- render_contract.rs executable field/role/event milestone inventory
398+
|- platform_host/ planned zero-widget OS shell and presentation boundary
366399
|- backend/ + platform/ legacy execution/planning migration baseline
367400
`- *_native/ AppKit, GTK4, and WinUI control hosts during migration
368401
@@ -378,6 +411,7 @@ packaging/ unsigned native smoke-bundle assets and validators
378411
- [Architecture and ownership boundaries](docs/architecture.md)
379412
- [Layout and Graphics Scene contract](docs/layout-scene.md)
380413
- [Renderer field inventory](docs/renderer-field-inventory.md)
414+
- [Self-drawn platform host architecture](docs/platform-hosts.md)
381415
- [RSX language and hooks](docs/rsx.md)
382416
- [RSX framework plan](docs/rsx-framework.md)
383417
- [TSX to native runtime architecture](docs/tsx-native-runtime.md)

0 commit comments

Comments
 (0)