Skip to content

Commit d7f4a29

Browse files
committed
Update docs and benchmarks for v0.1.0
- README: add deps.edn section, update var counts (637/706, 17 namespaces), add cljw.wasm namespace, update test counts (74 files, 50 upstream) - DIFFERENCES: update clojure.core 635→637 - bench/README: update CW results from entry 69.0 - bench/history: fix list_build 0→6 in entry 69.0
1 parent 1046dd8 commit d7f4a29

4 files changed

Lines changed: 63 additions & 14 deletions

File tree

‎DIFFERENCES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Java standard library functionality is replaced with Zig equivalents:
6363

6464
| Namespace | Done | Total | Notes |
6565
|----------------|------|-------|-----------------------------|
66-
| clojure.core | 635 | 706 | 90% — see skip list below |
66+
| clojure.core | 637 | 706 | 90% — see skip list below |
6767
| clojure.test | 32 | 39 | No spec integration |
6868
| clojure.pprint | 9 | 26 | Core pprint + print-table |
6969
| clojure.repl | 11 | 13 | No spec, no Java reflection |

‎README.md‎

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ a native implementation targeting behavioral compatibility with Clojure.
2323
- **Single binary distribution** — `cljw build app.clj -o app`, runs without cljw installed
2424
- **Wasm FFI** — call WebAssembly modules from Clojure (523 opcodes including SIMD + GC)
2525
- **Dual backend** — bytecode VM (default) + TreeWalk interpreter (reference)
26-
- **835+ vars** across 16 namespaces (635/706 clojure.core)
26+
- **deps.edn compatible** — Clojure CLI subset (-A/-M/-X/-P, git deps, local deps)
27+
- **869+ vars** across 17 namespaces (637/706 clojure.core)
2728

2829
## Getting Started
2930

@@ -46,6 +47,26 @@ zig build -Doptimize=ReleaseSafe # Optimized build
4647
./zig-out/bin/cljw # Interactive REPL
4748
```
4849

50+
### deps.edn Projects
51+
52+
```bash
53+
# Download dependencies (git deps require explicit -P)
54+
./zig-out/bin/cljw -P
55+
56+
# Run with aliases
57+
./zig-out/bin/cljw -M:run # Main opts
58+
./zig-out/bin/cljw -X:build # Exec function
59+
./zig-out/bin/cljw -A:dev src/app.clj # Extra paths
60+
./zig-out/bin/cljw -Spath # Show classpath
61+
62+
# Run tests
63+
./zig-out/bin/cljw test # Auto-discover test/
64+
./zig-out/bin/cljw test -A:test # With alias
65+
```
66+
67+
Supports `:local/root`, `:git/url`+`:git/sha`, `:deps/root`, transitive deps.
68+
No Maven/Clojars support (git deps and local deps only).
69+
4970
### Build a Standalone Binary
5071

5172
```bash
@@ -71,7 +92,7 @@ Known divergences are documented in [DIFFERENCES.md](DIFFERENCES.md).
7192

7293
| Namespace | Vars | Description |
7394
|--------------------|------|--------------------------------|
74-
| clojure.core | 635 | Core language functions |
95+
| clojure.core | 637 | Core language functions |
7596
| clojure.string | 21 | String manipulation |
7697
| clojure.math | 45 | Math functions |
7798
| clojure.set | 12 | Set operations |
@@ -87,6 +108,7 @@ Known divergences are documented in [DIFFERENCES.md](DIFFERENCES.md).
87108
| clojure.java.io | 7 | File I/O (Zig-native) |
88109
| clojure.java.shell | 5 | Shell commands (sh) |
89110
| cljw.http | 6 | HTTP server/client |
111+
| cljw.wasm | 17 | WebAssembly FFI |
90112

91113
### Wasm FFI
92114

@@ -136,7 +158,7 @@ Call WebAssembly modules directly from Clojure:
136158
- **Bytecode VM** — 75 opcodes, superinstructions, fused branch ops
137159
- **ARM64 JIT** — hot integer loop detection with native code generation
138160
- **Bootstrap cache** — core.clj pre-compiled at build time (~5ms restore)
139-
- **Zero-config projects** — auto-detect `src/`, `cljw.edn` optional
161+
- **deps.edn projects** — Clojure CLI compatible config (git deps, local deps, aliases)
140162

141163
## Project Structure
142164

@@ -161,7 +183,7 @@ src/
161183
└── wasm/ WebAssembly runtime (523 opcodes)
162184
163185
bench/ 31 benchmarks, multi-language
164-
test/ 48 Clojure test files (43 upstream ports)
186+
test/ 74 Clojure test files (50 upstream ports)
165187
```
166188

167189
The [`.dev/`](.dev/) directory contains design decisions, optimization logs,
@@ -184,17 +206,17 @@ bash bench/run_bench.sh --bench=fib_recursive # Single benchmark
184206

185207
```bash
186208
zig build test # 1,300+ Zig test blocks
187-
bash test/e2e/run_e2e.sh # End-to-end tests
209+
bash test/e2e/run_e2e.sh # End-to-end tests (6 wasm)
210+
bash test/e2e/deps/run_deps_e2e.sh # deps.edn E2E tests (14)
188211
```
189212

190-
48 Clojure test files including 43 upstream test ports with 600+ deftests.
213+
74 Clojure test files including 50 upstream test ports with 600+ deftests.
191214
All tests verified on both VM and TreeWalk backends.
192215

193216
## Future Plans
194217

195218
- **JIT expansion** — float operations, function calls, broader loop patterns
196219
- **Generational GC** — nursery/tenured generations for throughput
197-
- **Dependency management** — deps.edn compatible (git/sha deps)
198220
- **Persistent data structures** — HAMT/RRB-Tree implementations
199221
- **wasm_rt** — compile Clojure to run *inside* WebAssembly
200222

‎bench/README.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ bench/
188188
simd/ # SIMD benchmark programs
189189
```
190190

191-
## Latest Clojure Results (2026-02-13)
191+
## Latest Clojure Results (2026-02-14)
192192

193193
Apple M4 Pro, 48GB RAM, macOS 15. hyperfine 5 runs + 2 warmup.
194194
All times in milliseconds. These are **cold start** measurements (process
@@ -201,7 +201,7 @@ launch to exit) — languages with heavy runtimes (JVM, V8) pay startup cost.
201201
| tak | 7 | 13.2 | 33.6 | 24.2 | 21.0 | 1.7 | 2.9 | 2.0 |
202202
| arith_loop | 5 | 60.7 | 54.5 | 25.2 | 21.4 | 1.7 | 1.2 | 1.7 |
203203
| map_filter_reduce | 7 | 13.0 | 35.9 | 23.7 | 21.4 | 1.4 | 1.4 | 2.6 |
204-
| vector_ops | 7 | 13.5 | 31.6 | 22.7 | 24.1 | 1.3 | 1.4 | 2.3 |
204+
| vector_ops | 6 | 13.5 | 31.6 | 22.7 | 24.1 | 1.3 | 1.4 | 2.3 |
205205
| map_ops | 5 | 12.8 | 30.8 | 22.3 | 18.7 | 1.0 | 1.7 | 2.4 |
206206
| list_build | 5 | 14.6 | 34.6 | 25.7 | 21.9 | 1.5 | 1.8 | 2.5 |
207207
| sieve | 6 | 12.2 | 35.8 | 24.4 | 23.8 | 1.4 | 1.2 | 1.6 |
@@ -211,9 +211,9 @@ launch to exit) — languages with heavy runtimes (JVM, V8) pay startup cost.
211211
| lazy_chain | 8 | 15.4 | 33.0 | 26.1 | 22.2 | 2.6 | 1.6 | 2.2 |
212212
| transduce | 6 | 12.6 | 36.2 | 23.5 | 23.7 | 1.3 | 1.7 | 1.9 |
213213
| keyword_lookup | 12 | 19.4 | 37.0 | 27.4 | 23.9 | 1.6 | 0.0 | 4.9 |
214-
| protocol_dispatch | 5 | 12.7 | 32.8 | 24.3 | 22.0 | 2.3 | 1.7 | 2.2 |
215-
| nested_update | 12 | 12.6 | 32.9 | 24.0 | 23.7 | 0.2 | 1.3 | 3.1 |
216-
| string_ops | 27 | 25.2 | 38.0 | 24.5 | 24.8 | 4.3 | 2.0 | 1.5 |
214+
| protocol_dispatch | 7 | 12.7 | 32.8 | 24.3 | 22.0 | 2.3 | 1.7 | 2.2 |
215+
| nested_update | 11 | 12.6 | 32.9 | 24.0 | 23.7 | 0.2 | 1.3 | 3.1 |
216+
| string_ops | 25 | 25.2 | 38.0 | 24.5 | 24.8 | 4.3 | 2.0 | 1.5 |
217217
| multimethod_dispatch | 6 | 13.3 | 33.8 | 24.6 | 20.0 | 2.6 | 0.9 | 2.1 |
218218
| real_workload | 10 | 13.6 | 37.1 | 24.7 | 26.6 | 0.9 | 1.0 | 1.7 |
219219

@@ -241,7 +241,7 @@ Measured as ReleaseSafe builds on ARM64 macOS.
241241
zwasm is **1/50th** the size of wasmtime and **1/100th** of wasmer.
242242
Full Wasm 3.0 support (all 9 proposals including GC) in 1.1 MB.
243243

244-
## Latest Wasm Runtime Results (2026-02-13)
244+
## Latest Wasm Runtime Results (2026-02-14)
245245

246246
CW's built-in Wasm runtime (zwasm, Register IR + ARM64/x86_64 JIT)
247247
vs 4 other Wasm runtimes. Apple M4 Pro, 48GB RAM.

‎bench/history.yaml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,3 +877,30 @@ entries:
877877
string_ops: {time_ms: 25, mem_mb: 20.5}
878878
multimethod_dispatch: {time_ms: 6, mem_mb: 10.8}
879879
real_workload: {time_ms: 9, mem_mb: 17.1}
880+
- id: "69.0"
881+
date: "2026-02-14"
882+
reason: "Phase 69: deps.edn cleanup, cljw.edn removed, pre-v0.1.0 tag"
883+
commit: "1046dd8"
884+
build: ReleaseSafe
885+
backend: vm
886+
results:
887+
fib_recursive: {time_ms: 19, mem_mb: 11.5}
888+
fib_loop: {time_ms: 6, mem_mb: 11.6}
889+
tak: {time_ms: 9, mem_mb: 11.5}
890+
arith_loop: {time_ms: 5, mem_mb: 11.5}
891+
map_filter_reduce: {time_ms: 7, mem_mb: 12.2}
892+
vector_ops: {time_ms: 6, mem_mb: 16.7}
893+
map_ops: {time_ms: 5, mem_mb: 15.6}
894+
list_build: {time_ms: 6, mem_mb: 12.1}
895+
sieve: {time_ms: 6, mem_mb: 15.1}
896+
nqueens: {time_ms: 15, mem_mb: 22.6}
897+
atom_swap: {time_ms: 5, mem_mb: 11.6}
898+
gc_stress: {time_ms: 32, mem_mb: 17.3}
899+
lazy_chain: {time_ms: 7, mem_mb: 11.6}
900+
transduce: {time_ms: 6, mem_mb: 11.6}
901+
keyword_lookup: {time_ms: 12, mem_mb: 11.6}
902+
protocol_dispatch: {time_ms: 7, mem_mb: 11.6}
903+
nested_update: {time_ms: 11, mem_mb: 16.7}
904+
string_ops: {time_ms: 25, mem_mb: 21.3}
905+
multimethod_dispatch: {time_ms: 6, mem_mb: 11.6}
906+
real_workload: {time_ms: 10, mem_mb: 18.6}

0 commit comments

Comments
 (0)