An AI-native operating system built on W3C standards. TypeScript + DOM compiled to native binaries. No browser. No V8.
app.ts β w3cos build β native binary (2.4 MB)
W3C OS is a Linux-based operating system where:
- Applications use standard W3C DOM + CSS (the same APIs as the Web)
- TypeScript is compiled to native machine code via Rust/LLVM (not interpreted)
- AI agents can read and operate every UI element directly through the DOM β no screenshot guessing
- The system boots from a minimal Linux kernel directly into the W3C OS Shell
Write Web-standard code. Get native performance. Give AI full visibility.
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/wangnaihe/w3cos.git
cd w3cos
cargo build --release
# Compile a TypeScript app to a native binary
./target/release/w3cos build examples/showcase/app.tsx -o showcase --release
./showcase # Opens a native window β no browser involved// app.tsx β a native application written in TSX
import { Column, Text, Button } from "@w3cos/std"
export default
<Column style={{ gap: 20, padding: 48, alignItems: "center", background: "#0f0f1a" }}>
<Text style={{ fontSize: 42, color: "#e94560" }}>W3C OS</Text>
<Text style={{ fontSize: 20, color: "#a0a0b0" }}>Native binary from TSX.</Text>
<Button style={{ background: "#e94560", borderRadius: 8 }}>Get Started</Button>
</Column>// app.ts β alternative function-call syntax
import { Column, Text, Button } from "@w3cos/std"
export default Column({
style: { gap: 20, padding: 48, alignItems: "center", background: "#0f0f1a" },
children: [
Text("W3C OS", { style: { fontSize: 42, color: "#e94560" } }),
Text("Native binary from TypeScript.", { style: { fontSize: 20, color: "#a0a0b0" } }),
Button("Get Started", { style: { background: "#e94560", borderRadius: 8 } }),
]
})$ w3cos build app.tsx -o myapp --release
β‘ Transpiling TS β Rust... done
π¨ Compiling native binary... done
β
Output: ./myapp (2.4 MB)| Electron | React Native | Flutter | W3C OS | |
|---|---|---|---|---|
| Binary Size | 90+ MB | 30+ MB | 15+ MB | 2.4 MB |
| RAM Usage | 200+ MB | 100+ MB | 80+ MB | ~15 MB |
| Startup | 2-5 sec | 1-3 sec | 0.5-2 sec | < 100ms |
| Language | JS (V8 JIT) | JS (Hermes) | Dart (AOT) | TS (native AOT) |
| Runtime | Chromium | Bridge + Native | Dart VM | None |
| DOM API | β (browser only) | β | β | β (system-wide) |
| AI reads UI | Screenshot | Screenshot | Screenshot | DOM tree (< 1ms) |
| Standard | Proprietary | Proprietary | Proprietary | W3C |
| Installable OS | β | β | β | β |
Traditional operating systems are opaque to AI β an AI agent must take screenshots and guess what's on screen (slow, expensive, fragile).
W3C OS applications are built with the DOM. AI agents read the DOM tree directly:
Traditional OS: AI sees pixels β vision model β guess UI β click coordinates (1-3 sec, $$$)
W3C OS: AI reads DOM β structured tree β precise action (< 1ms, free)
Three access levels for AI agents:
- Layer 1 β DOM Access: Read/write any element, trigger events. 100% precise. < 1ms.
- Layer 2 β Accessibility Tree: ARIA-compliant summary. Minimal tokens for LLMs.
- Layer 3 β Annotated Screenshot: For Claude Computer Use / UI-TARS compatibility.
W3C OS can boot as a standalone operating system β directly into the W3C OS Shell.
# Prerequisites (Linux): build-essential, ncurses-dev, wget, python3
# On macOS, the script will automatically use Docker for cross-compilation.
./system/scripts/build-iso.sh # Output: w3cos.iso (~50-100 MB)# Option 1: QEMU virtual machine
qemu-system-x86_64 -cdrom w3cos.iso -m 2G -vga virtio
# Option 2: Flash to USB and boot real hardware
sudo dd if=w3cos.iso of=/dev/sdX bs=4M status=progress
# Option 3: Docker (compile apps, no GUI)
docker build -t w3cos . && docker run w3cos --help
# Option 4: GitHub Codespaces (one-click dev environment)
# Click "Open in Codespaces" on the GitHub repo pageSee system/INSTALL.md for the full installation guide.
TypeScript (W3C DOM + CSS) β You write this
β w3cos-compiler
Rust source code (auto-generated) β AST transform
β rustc + LLVM
Native ELF/Mach-O binary β Machine code
β Linux kernel
Runs directly on hardware β No runtime
| Layer | Technology | What it does |
|---|---|---|
| CSS Layout | Taffy 0.9 | Flexbox, Grid, Block, position |
| Text Layout | Parley | Line-breaking, shaping, bidi |
| 2D Rendering | tiny-skia β Vello (Phase 2) | Vector graphics |
| Windowing | winit | Cross-platform native windows |
| OS Base | Linux kernel (Debian Minimal / Buildroot) | Drivers, processes, filesystem |
| Feature | Status |
|---|---|
| Flexbox / Grid | β Full |
| Block layout | β |
position: relative / absolute |
β |
position: fixed / sticky |
π |
overflow: hidden / scroll |
β |
z-index |
β |
Units: px, %, rem, em, vw, vh |
β |
border-radius, opacity |
β |
box-shadow |
β |
transform: translate / scale / rotate |
β |
transition (easing functions) |
β |
display: inline / inline-block |
π |
| Mouse events (hover, click) | β |
w3cos/
βββ crates/
β βββ w3cos-std/ # Type definitions (Style, Component, Color)
β βββ w3cos-dom/ # W3C DOM API (Document, Element, Events)
β βββ w3cos-a11y/ # Accessibility tree (ARIA, for AI + screen readers)
β βββ w3cos-ai-bridge/ # AI agent interface (3-layer access + permissions)
β βββ w3cos-compiler/ # TS β Rust transpiler
β βββ w3cos-runtime/ # Layout + Rendering + Window + Events
β βββ w3cos-cli/ # CLI: w3cos build / w3cos run
βββ system/
β βββ buildroot/ # Bootable ISO config
β βββ rootfs_overlay/ # System init scripts
β βββ scripts/ # build-iso.sh, run-qemu.sh
β βββ INSTALL.md # Installation guide
βββ examples/ # 4 example applications
βββ .openclaw/ # OpenClaw + Lobster AI workflow configs
βββ .devcontainer/ # One-click dev environment
βββ Dockerfile # Container build
βββ ARCHITECTURE.md # Full architecture document
βββ AI_DEVELOPMENT.md # AI-driven development model
βββ ROADMAP.md # Phased development plan
βββ CONTRIBUTING.md # How to contribute (AI + humans)
W3C OS is built by AI agents, directed by humans.
Humans file Issues β Management AI triages β Contributor AI codes β Human approves
- Humans: File Issues, review PRs, make architecture decisions, sponsor tokens
- AI (Management): Triage issues, review PRs, run CI, manage releases
- AI (Contributor): Pick up
ai-readyissues, implement features, write tests, submit PRs
AI tokens are funded by community sponsors. Every dollar goes to AI compute.
See AI_DEVELOPMENT.md for the full model, and CONTRIBUTING.md to get involved.
AI agents need tokens. Your sponsorship keeps development moving.
| Tier | Amount | Impact |
|---|---|---|
| Byte | $5/mo | ~1 AI-implemented issue/month |
| Kilobyte | $25/mo | ~5 AI-implemented issues/month |
| Megabyte | $100/mo | ~20 AI-implemented issues/month |
| Gigabyte | $500/mo | Sustained AI development capacity |
100% goes to AI compute. No human salaries. Fully transparent.
Apache 2.0 β open, neutral, not controlled by any single corporation.