You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 57cd900
Browse filesBrowse the repository at this point in the historyBrowse files
TypeScript, chunk manifests, compiler-owned server/client splits, and
65
+
intent-first authoring. They compile down to the same runtime registries and
66
+
HTML protocol.
65
67
66
68
## Layers
67
69
68
-
Async is designed as layers, so each level can stay useful without forcing the
69
-
next level on every app.
70
-
71
-
| Shorthand | Name | Requirement | Purpose |
72
-
| --- | --- | --- | --- |
73
-
| L1 | Runtime bootloader | No build. CDN or direct ESM import. | Signals, async signals, scheduler, handlers, command events, lifecycle pseudo-events, scoped fragments, and boundary swaps. |
74
-
| L1.5 | App/server and streaming bridge | Light server integration. No app compiler required. |`Async.use(...)`, router modes, server function proxy, partial declarations, SSR output, browser activation, split browser/server cache, and streamed boundary patches. |
75
-
| L2 | Build-required authoring and compiler profile | Build step required. | JSX, ESM, and TypeScript authoring, optimizer reports, generated plans, generated registries, chunks, manifests, and future resumability records that lower onto L1 and L1.5 protocols. |
76
-
77
-
The package in this repository intentionally focuses on L1 and L1.5. L2 is a
78
-
higher authoring surface, not an extra runtime requirement for plain HTML apps.
70
+
Async's layer model is an abstraction ladder. Each rung is anchored to an era
71
+
of framework history and named by the abstraction it adds between the author
72
+
and the runtime protocol. Rungs are authoring abstractions; capabilities are
73
+
protocol properties that land at the lowest rung the protocol allows.
74
+
75
+
| Rung | Name | Era anchor | Adds | Requires |
76
+
| --- | --- | --- | --- | --- |
77
+
| L0 | Enhance | jQuery/Backbone; htmx | Behavior references on server-owned HTML | Script tag |
78
+
| L1 | Interpret | angular.js: runtime, no build | Runtime-interpreted app model: registries, components, lifecycle | Script tag or ESM |
79
+
| L2 | Bundle | Built SPAs | Build as delivery, client routing, app server | Build optional |
80
+
| L3 | SSR | React-without-JSX + SSR server | Server-rendered components with activation, no hydration | Server; build optional |
The scheduler is the Layer 1.5 ordering engine. Signal writes are still
662
-
synchronous:
690
+
The scheduler is the runtime ordering engine behind bindings, SSR activation,
691
+
and streaming. Signal writes are still synchronous:
663
692
664
693
```js
665
694
signals.set("count", 3);
@@ -696,7 +725,7 @@ await scheduler.flush();
696
725
```
697
726
698
727
Most apps do not need to call the scheduler directly. It is exposed for tests,
699
-
custom runtimes, streaming receivers, and higher layers that need explicit flush
728
+
custom runtimes, streaming receivers, and higher rungs that need explicit flush
700
729
boundaries.
701
730
702
731
### Async Signals
@@ -1024,7 +1053,7 @@ For app code, register routes and partials through the app registry:
1024
1053
-`Async.use({ route, partial })` plus `Async.start({ mode, boundary })` for app
1025
1054
hub setup.
1026
1055
1027
-
Most apps should start at that layer and only move down when they need a more
1056
+
Most apps should start at that level and only move down when they need a more
1028
1057
specific routing shape:
1029
1058
1030
1059
| If the app is doing this | Use this pattern |
@@ -1811,28 +1840,30 @@ then runs release doctor.
1811
1840
1812
1841
## Status
1813
1842
1814
-
The core runtime is intentionally small. Build-required JSX has optimizer
1843
+
The core runtime is intentionally small. Build-required JSX (L4) has optimizer
1815
1844
artifacts for event, signal, stream, and children-fragment lowering, while full
1816
1845
compiler emission, lazy chunk manifests, TSRX lowering, server resource
1817
-
compilation, and higher-level resumability metadata remain later layers. See
1846
+
compilation, and higher-level resumability metadata remain compiler-rung work
1847
+
(L6 and L7). See
1818
1848
`specs/framework/12-composition-patterns.md` for composition pattern guidance
1819
1849
and planned source forms.
1820
1850
1821
1851
## Async And htmx
1822
1852
1823
1853
Async and htmx are both HTML-first and avoid a virtual DOM, but they optimize
1824
-
for different boundaries.
1854
+
for different boundaries. In ladder terms, htmx-style hypermedia is the L0
1855
+
Enhance rung — and in Async it stays available at every rung above.
1825
1856
1826
1857
| Area | htmx | Async |
1827
1858
| --- | --- | --- |
1828
1859
| Primary model | HTML attributes issue HTTP requests and swap server responses. | HTML attributes bind signals, command events, server calls, and route boundaries. |
1829
1860
| State | Server-owned hypermedia state; browser state is intentionally minimal. | Browser signal registry plus server signal patches and cache snapshots. |
1830
1861
| Server interaction | DOM attributes describe HTTP verbs, targets, and swaps. | `server.*(...)` commands call registered server functions and apply returned effects. |
1831
1862
| Routing | Usually server navigation or htmx-boosted navigation. | CSR, SPA, SSR, SSR-SPA, and MPA router modes built around partial boundaries. |
1832
-
| Components | Server-rendered HTML fragments. | Scoped fragment functions today; higher layers can compile JSX/TSRX later. |
1833
-
| Build story | No build by default. | Layer 1 is no-build/CDN; higher layers can add build or compiler steps. |
1863
+
| Components | Server-rendered HTML fragments. | Scoped fragment functions today; the compiler rungs add JSX/TSRX authoring. |
1864
+
| Build story | No build by default. | Rungs L0-L3 and L5 are no-build/CDN; the compiler rungs (L4, L6, L7) add build or compiler steps. |
1834
1865
1835
1866
Use htmx when the server should own most interaction through hypermedia and
1836
1867
HTTP swaps. Use Async when you want an HTML-first runtime that also has local
Copy file name to clipboardExpand all lines: docs/build/profile.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Build Profile
2
2
3
-
The build-required profile adds JSX, TypeScript, optimizer reports, and framework plans while preserving the L1 and L1.5 runtime contracts.
3
+
The build-required profile covers the compiler rungs of the abstraction ladder: L4 Transform (JSX, TypeScript) and L6 Reorder (optimizer reports, framework plans, runtime slices). It preserves the no-compiler runtime contracts (rungs L0-L3, L5) — see the [Layers guide](#/docs/layers).
4
4
5
5
## JSX entrypoints
6
6
@@ -41,6 +41,15 @@ The optimizer classifies source inventory, signal ownership, event syntax, child
41
41
42
42
Each selected runtime slice carries a `status`: `available` slices (`signals`, `events`) activate through `@async/framework/runtime` today, while `planned` slices (`async-signals`, `stream`) are recorded in the report — with a `runtime-slice-planned` warning diagnostic — until their runtime entrypoints ship.
43
43
44
+
## Vite plugin config
45
+
46
+
`asyncFramework(...)` declares needs, not ladder positions:
47
+
48
+
-`server.entry` selects the server lane. The plugin composes the Hono dev server; the app owns the HTML shell, SSR, and streaming.
49
+
-`client.entry` selects the browser build lane.
50
+
- The JSX bootstrap is detected from imports of `@async/framework/jsx` in `.jsx`/`.tsx` modules; there is no transform switch to set.
51
+
- The legacy `layer` option only annotates the build report and is scheduled for replacement by the needs-based config in `specs/framework/15-abstraction-layers.md`; omit it.
52
+
44
53
## Current boundary
45
54
46
-
The package includes the runtime, server bridge, JSX profile types, and Vite profile helpers. The optimizer consumes a fixture profile (`asyncFramework({ fixture })`); source-derived profile generation, full compiler emission, lazy chunk manifests, TSRX lowering, boundary activation for `planned` slices, and higher-level resume metadata remain later layers.
55
+
The package includes the runtime, server bridge, JSX profile types, and Vite profile helpers. The optimizer consumes a fixture profile (`asyncFramework({ fixture })`); source-derived profile generation, full compiler emission, lazy chunk manifests, TSRX lowering, boundary activation for `planned` slices, and higher-level resume metadata remain later compiler-rung work (L6, and L7 per `specs/framework/16-whole-program-compiler.md`).
0 commit comments