Design choices
import { state } from '@markless/core';
export default function Weather() @{
let unit = state('Celsius');
<p>Showing: {unit}</p>
}unit is a value the page watches, and {unit} is the one spot that shows it. Before this file runs anywhere, the compiler knows both. Reading code for what it means, not only for how it is spelled, is called semantic analysis.
The analyzer maps the whole project at compile time
The compiler's analyzer, built on yuku, reads every .tsrx file for its names and references:
- each file becomes a plan: its values, the spots that read them, and the code each event runs
- a link step joins the plans into one map of the project
- the bundler packs each page's code from that map
The browser does less work
Load both on a 3G phone, then press Get Started on each:
Work done in the browser: 1,403 kB of JavaScript executed at load on the shadcn/ui docs home page.
See it live: the Markless port and the original. Both are work-in-progress previews, not official shadcn/ui sites. Numbers: the Markless README, Chromium, both on Cloudflare, median of 3.
Two copies of the shadcn/ui docs home page: the original in Next.js and the Markless port. Press Load on a 3G phone.
- The port executes 131 kB of JavaScript at load; the original executes 1,403 kB.
- On a 3G phone, the port answers its first click at 3.9 s; the original at 14.6 s.
- The original runs its components again in the browser to attach their events. Markless decided that at compile time.
The page resumes instead of starting over
When a server renders the page, its HTML arrives already wired. The browser doesn't run your components again; code loads only when an event needs it. Resuming shows the first press.
What it costs
- A handler can read only what crosses to the browser: state, element handles, props, imports and constants.
- State sent from a server must be data, not functions.
- Components live in
.tsrxfiles, which need the Markless compiler and@markless/typescript-plugin. - Native screens are early proofs. The web is what ships.
How does this compare with other frameworks?
The rows for other projects come from their public docs. They compare mechanisms, not speed.
| How you write a value | On update | Effect API | Over server HTML | |
|---|---|---|---|---|
| React | useState and a setter |
Runs the component again, then diffs a virtual DOM | useEffect |
Runs components again |
| Solid | createSignal, read as count() |
Signals write the DOM | createEffect |
Runs components again |
| Svelte 5 | The $state rune |
Compiled signals | $effect |
Runs components again |
| Qwik | useSignal, read as .value, with $ on lazy code |
Signals | useTask$ |
Resumes |
| Markless | state('Celsius'), then plain unit |
Writes the compiler planned | None | Resumes |
The big idea shows one file planned for every device.