Skip to content

Commit 7bae299

Browse files
committed
revamp landing page, docs nav, benchmarks, and pipeline animation
- landing page: hero with rotator, stat cards, pipeline animation, it's fast/familiar/friendly story sections, benchmarks, production links, cta - pipeline animation: code editor → ast overlays → block grid → analyze scan → column stack → ir morph → cube binary output - nav: simplified to docs/stdlib/benchmarks, separate stdlib sidebar - benchmarks: fix chadscript label sig figs, remove place badges, show grep/xxd - copy: brand as systems programming language, mention llvm throughout - features page: lead with json/sql/http questions - quickstart: explain chad run vs chad build - readme: updated copy and benchmark table
1 parent 03894db commit 7bae299

File tree

14 files changed

+974
-349
lines changed

14 files changed

+974
-349
lines changed

README.md

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# ChadScript
22

3-
As fast as C, as ergonomic as TypeScript.
3+
TypeScript, compiled to native code.
44

5-
ChadScript compiles TypeScript to native binaries. No Node.js, no V8, no runtime. Sub-2ms startup, ~250KB binaries.
5+
ChadScript compiles a statically analyzable subset of TypeScript to native machine code via LLVM — the same backend behind C, Rust, and Swift. No VM, no interpreter, no runtime. The output is a standalone binary: sub-millisecond startup, ~250KB, zero dependencies.
66

77
The compiler is self-hosting and the only dependency is itself. Install with curl, not npm.
88

99
**Status: Beta** — self-hosting, 621+ tests, used in [production](https://chadsmith.dev/weather).
1010

11+
**[Docs](https://cs01.github.io/ChadScript/getting-started/installation)** · **[Standard Library](https://cs01.github.io/ChadScript/stdlib/)** · **[Language Features](https://cs01.github.io/ChadScript/language/features)** · **[Benchmarks](https://cs01.github.io/ChadScript/benchmarks)**
12+
1113
---
1214

1315
## Install
@@ -69,7 +71,7 @@ Hono-style API, C-level performance. One binary, no node_modules. See [`examples
6971

7072
## Benchmarks
7173

72-
Compared against C, Go, Node.js, and Bun on Ubuntu (CI):
74+
ChadScript compiles through LLVM, the same backend behind C and Rust — so it gets the same optimization passes. The numbers reflect this:
7375

7476
| Benchmark | C | ChadScript | Go | Node | Bun |
7577
| -------------- | ------ | ---------- | ------ | ------ | ------ |
@@ -78,52 +80,26 @@ Compared against C, Go, Node.js, and Bun on Ubuntu (CI):
7880
| Fibonacci | 0.725s | **1.424s** | 1.429s | 2.842s | 1.837s |
7981
| JSON Parse | 0.004s | **0.005s** | 0.016s | 0.015s | 0.007s |
8082
| N-Body Sim | 1.453s | **1.852s** | 1.964s | 2.296s | 2.817s |
83+
| File I/O | 0.088s | **0.089s** | 0.088s | 0.315s | 0.204s |
84+
| Quicksort | 0.170s | **0.202s** | 0.184s | 0.249s | 0.205s |
85+
| SQLite | 0.314s | **0.374s** | --- | 0.437s | 0.371s |
86+
| Sieve | 0.027s | **0.038s** | 0.033s | 0.054s | 0.049s |
8187

82-
Updated on every PR. [Source](https://github.com/cs01/ChadScript/tree/main/benchmarks)
88+
[Full benchmarks](https://cs01.github.io/ChadScript/benchmarks) (updated on every PR)
8389

8490
---
8591

86-
## How it works
92+
## It's Fast
8793

88-
```bash
89-
chad run app.ts # compile + run in one step — no build config, no install
90-
chad build app.ts # or compile to a standalone binary
91-
```
94+
Your code goes through the same LLVM optimization passes as C and Rust — not a JIT, not an interpreter. 0.8ms cold start, native execution speed.
9295

93-
Every type is resolved at compile time. The compiler optimizes your code the same way C and Rust compilers do. `chad run` compiles and executes in one step — no build step, no install process, no config files. When you want a deployable binary, `chad build` produces a single native executable.
94-
95-
---
96+
## It's Familiar
9697

97-
## Why TypeScript syntax?
98+
Classes, interfaces, generics, async/await, closures, destructuring, template literals, JSX, `for...of`, `Map`, `Set`, `Promise.all` — it's the TypeScript you already write. No new syntax, no new mental model.
9899

99-
TypeScript is familiar to millions of developers, and LLMs generate it fluently. ChadScript uses a statically-typed subset where every type is resolved at compile time — no `any`, no runtime type checks, no surprises:
100+
## It's Friendly
100101

101-
- **Null safety**`string` is never null. Use `string | null` and `?.` for optional values.
102-
- **No manual memory management** — automatic garbage collection. No use-after-free, no double-frees.
103-
- **Compile-time error catching** — type mismatches, invalid method calls, and unsafe patterns are caught before your code runs.
104-
- **C interop** — call any C library directly with `declare function`. No wrappers, no overhead.
105-
- **IDE support**`chad init` generates `tsconfig.json` with ChadScript types. VS Code works out of the box.
106-
107-
---
108-
109-
## What's included
110-
111-
No `npm install`. Everything ships with the compiler:
112-
113-
| Module | What it does |
114-
| --------------------- | ------------------------ |
115-
| `fetch` | HTTP client |
116-
| `Router`, `httpServe` | HTTP server with routing |
117-
| `fs` | File system |
118-
| `sqlite` | Embedded database |
119-
| `crypto` | Hashing, random bytes |
120-
| `JSON` | Typed parse/stringify |
121-
| `child_process` | Spawn subprocesses |
122-
| `WebSocket` | WebSocket server |
123-
| `Map`, `Set` | Hash map and set |
124-
| `RegExp` | Regular expressions |
125-
| `console` | Prints any type |
126-
| `ArgumentParser` | CLI argument parsing |
102+
No `npm install`. Everything ships with the compiler: HTTP server, SQLite, fetch, crypto, WebSocket, JSON, filesystem, regex, child processes, argument parsing. Write your code, compile it, ship a single binary.
127103

128104
---
129105

@@ -150,4 +126,4 @@ See [`examples/cli-tools/`](examples/cli-tools/) for a suite of Unix tool replac
150126
- [Quickstart](https://cs01.github.io/ChadScript/getting-started/quickstart)
151127
- [Supported Features](https://cs01.github.io/ChadScript/language/features)
152128
- [Standard Library](https://cs01.github.io/ChadScript/stdlib/)
153-
- [FAQ](https://cs01.github.io/ChadScript/faq)
129+

benchmarks/assemble_json.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,16 @@
4646
continue
4747
lang, value, label = parts[0], parts[1], parts[2]
4848
try:
49-
results[lang] = {"value": round(float(value), 3), "label": label}
49+
rounded = round(float(value), 3)
50+
meta_info = META.get(bkey, {"metric": "s"})
51+
metric = meta_info.get("metric", "s")
52+
if metric == "ms":
53+
clean_label = f"{rounded}ms"
54+
elif metric in ("req/s", "msg/s"):
55+
clean_label = f"{int(rounded)} {metric}"
56+
else:
57+
clean_label = f"{rounded:.3f}s"
58+
results[lang] = {"value": rounded, "label": clean_label}
5059
except ValueError:
5160
continue
5261
if lang == "chadscript":

docs/.vitepress/config.mts

Lines changed: 76 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -23,72 +23,84 @@ export default defineConfig({
2323
},
2424

2525
nav: [
26-
{ text: 'Getting Started', link: '/getting-started/installation' },
27-
{ text: 'Fundamentals', link: '/language/features' },
28-
{ text: 'Reference', link: '/stdlib/' },
29-
{ text: 'GitHub', link: 'https://github.com/cs01/ChadScript' }
26+
{ text: 'Docs', link: '/getting-started/installation' },
27+
{ text: 'Standard Library', link: '/stdlib/' },
28+
{ text: 'Benchmarks', link: '/benchmarks' },
3029
],
3130

32-
sidebar: [
33-
{
34-
text: 'Getting Started',
35-
items: [
36-
{ text: 'What is ChadScript?', link: '/why-chadscript' },
37-
{ text: 'Installation', link: '/getting-started/installation' },
38-
{ text: 'Quickstart', link: '/getting-started/quickstart' },
39-
{ text: 'IDE Setup', link: '/getting-started/ide-setup' },
40-
]
41-
},
42-
{
43-
text: 'Fundamentals',
44-
items: [
45-
{ text: 'Language', link: '/language/features' },
46-
{ text: 'How It Works', link: '/language/architecture' },
47-
{ text: 'FFI', link: '/language/ffi' },
48-
{ text: 'Debugging', link: '/getting-started/debugging' },
49-
]
50-
},
51-
{
52-
text: 'Reference',
53-
items: [
54-
{ text: 'CLI', link: '/getting-started/cli' },
55-
{ text: 'Type Mappings', link: '/language/type-mappings' },
56-
{
57-
text: 'Standard Library',
58-
collapsed: true,
59-
items: [
60-
{ text: 'Overview', link: '/stdlib/' },
61-
{ text: 'Array Methods', link: '/stdlib/array' },
62-
{ text: 'Async', link: '/stdlib/async' },
63-
{ text: 'ChadScript.embed', link: '/stdlib/embed' },
64-
{ text: 'child_process', link: '/stdlib/child-process' },
65-
{ text: 'console', link: '/stdlib/console' },
66-
{ text: 'crypto', link: '/stdlib/crypto' },
67-
{ text: 'Date', link: '/stdlib/date' },
68-
{ text: 'fetch', link: '/stdlib/fetch' },
69-
{ text: 'fs', link: '/stdlib/fs' },
70-
{ text: 'HTTP Server / Router', link: '/stdlib/http-server' },
71-
{ text: 'JSON', link: '/stdlib/json' },
72-
{ text: 'Map', link: '/stdlib/map' },
73-
{ text: 'Math', link: '/stdlib/math' },
74-
{ text: 'Number', link: '/stdlib/number' },
75-
{ text: 'Object', link: '/stdlib/object' },
76-
{ text: 'os', link: '/stdlib/os' },
77-
{ text: 'path', link: '/stdlib/path' },
78-
{ text: 'process', link: '/stdlib/process' },
79-
{ text: 'RegExp', link: '/stdlib/regexp' },
80-
{ text: 'Set', link: '/stdlib/set' },
81-
{ text: 'sqlite', link: '/stdlib/sqlite' },
82-
{ text: 'String Methods', link: '/stdlib/string' },
83-
{ text: 'Syscalls', link: '/stdlib/syscalls' },
84-
{ text: 'Test Runner', link: '/stdlib/test-runner' },
85-
{ text: 'tty', link: '/stdlib/tty' },
86-
{ text: 'Uint8Array', link: '/stdlib/uint8array' },
87-
]
88-
},
89-
]
90-
},
91-
],
31+
sidebar: {
32+
'/': [
33+
{
34+
text: 'Getting Started',
35+
items: [
36+
{ text: 'Installation', link: '/getting-started/installation' },
37+
{ text: 'Quickstart', link: '/getting-started/quickstart' },
38+
{ text: 'IDE Setup', link: '/getting-started/ide-setup' },
39+
]
40+
},
41+
{
42+
text: 'Language',
43+
items: [
44+
{ text: 'Features', link: '/language/features' },
45+
{ text: 'Debugging', link: '/getting-started/debugging' },
46+
]
47+
},
48+
{
49+
text: 'CLI',
50+
items: [
51+
{ text: 'Commands', link: '/getting-started/cli' },
52+
]
53+
},
54+
{
55+
text: 'Standard Library',
56+
link: '/stdlib/',
57+
},
58+
{
59+
text: 'Advanced',
60+
items: [
61+
{ text: 'FFI', link: '/language/ffi' },
62+
{ text: 'How It Works', link: '/language/architecture' },
63+
{ text: 'Type Mappings', link: '/language/type-mappings' },
64+
]
65+
},
66+
],
67+
'/stdlib/': [
68+
{
69+
text: 'Standard Library',
70+
items: [
71+
{ text: 'Overview', link: '/stdlib/' },
72+
{ text: 'Array', link: '/stdlib/array' },
73+
{ text: 'Async', link: '/stdlib/async' },
74+
{ text: 'child_process', link: '/stdlib/child-process' },
75+
{ text: 'console', link: '/stdlib/console' },
76+
{ text: 'crypto', link: '/stdlib/crypto' },
77+
{ text: 'Date', link: '/stdlib/date' },
78+
{ text: 'embed', link: '/stdlib/embed' },
79+
{ text: 'encoding', link: '/stdlib/encoding' },
80+
{ text: 'fetch', link: '/stdlib/fetch' },
81+
{ text: 'fs', link: '/stdlib/fs' },
82+
{ text: 'HTTP Server', link: '/stdlib/http-server' },
83+
{ text: 'JSON', link: '/stdlib/json' },
84+
{ text: 'Map', link: '/stdlib/map' },
85+
{ text: 'Math', link: '/stdlib/math' },
86+
{ text: 'Number', link: '/stdlib/number' },
87+
{ text: 'Object', link: '/stdlib/object' },
88+
{ text: 'os', link: '/stdlib/os' },
89+
{ text: 'path', link: '/stdlib/path' },
90+
{ text: 'process', link: '/stdlib/process' },
91+
{ text: 'RegExp', link: '/stdlib/regexp' },
92+
{ text: 'Set', link: '/stdlib/set' },
93+
{ text: 'sqlite', link: '/stdlib/sqlite' },
94+
{ text: 'String', link: '/stdlib/string' },
95+
{ text: 'Syscalls', link: '/stdlib/syscalls' },
96+
{ text: 'Test Runner', link: '/stdlib/test-runner' },
97+
{ text: 'tty', link: '/stdlib/tty' },
98+
{ text: 'Uint8Array', link: '/stdlib/uint8array' },
99+
{ text: 'URL', link: '/stdlib/url' },
100+
]
101+
},
102+
],
103+
},
92104

93105
socialLinks: [
94106
{ icon: 'github', link: 'https://github.com/cs01/ChadScript' }

docs/.vitepress/theme/HeroBenchmarks.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ const activeBench = computed(() => benchmarks.value[activeIndex.value])
3636
const entries = computed(() => {
3737
const b = activeBench.value
3838
if (!b) return []
39-
const langOrder = ['c', 'chadscript', 'go', 'bun', 'node']
39+
const langOrder = ['c', 'chadscript', 'go', 'bun', 'node', 'grep', 'ripgrep', 'xxd']
40+
const known = new Set(langOrder)
4041
const sorted = langOrder
4142
.filter(k => k in b.results)
4243
.map(k => ({ key: k, ...b.results[k] }))
44+
for (const k of Object.keys(b.results)) {
45+
if (!known.has(k)) sorted.push({ key: k, ...b.results[k] })
46+
}
4347
if (b.lower_is_better) {
4448
sorted.sort((a, b2) => a.value - b2.value)
4549
} else {

docs/.vitepress/theme/IRShowcase.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ onUnmounted(() => {
125125
<p class="cta-tagline">No build step. No install. Just <code>chad run yourfile.ts</code> and it compiles + runs instantly.</p>
126126
<div class="cta-buttons">
127127
<a href="/ChadScript/getting-started/installation" class="cta-link">Get Started</a>
128-
<a href="/ChadScript/why-chadscript" class="cta-link secondary">What is ChadScript?</a>
128+
<a href="/ChadScript/language/features" class="cta-link secondary">Language Features</a>
129129
</div>
130130
</div>
131131
</div>

0 commit comments

Comments
 (0)