@@ -23,7 +23,7 @@ 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 (461 opcodes including SIMD)
2525- ** Dual backend** — bytecode VM (default) + TreeWalk interpreter (reference)
26- - ** 795 vars** across 15+ namespaces (593/706 clojure.core)
26+ - ** 795 vars** across 16 namespaces (593/706 clojure.core)
2727
2828## Getting Started
2929
@@ -64,22 +64,11 @@ info, stacktrace, eldoc, etc.).
6464
6565## Features
6666
67- ### Language
68-
69- - Full Clojure reader (EDN, reader macros, syntax-quote, regex, tagged literals)
70- - Persistent collections: list, vector, hash-map, hash-set, sorted variants
71- - Transient collections for efficient batch operations
72- - Lazy sequences with GC-safe realization
73- - Protocols, defrecord, deftype, multimethods
74- - Destructuring (sequential, associative, nested)
75- - Transducers (map, filter, take, drop, partition, etc.)
76- - Numeric types: integers, floats, BigInt, BigDecimal, Ratio
77- - try/catch/throw, loop/recur, letfn, with-open
78- - Metadata system (with-meta, alter-meta!, vary-meta)
79- - Regex via built-in engine (re-find, re-matches, re-seq, re-groups)
80-
8167### Namespaces
8268
69+ Each namespace targets behavioral equivalence with its Clojure JVM counterpart.
70+ Known divergences are documented in [ DIFFERENCES.md] ( DIFFERENCES.md ) .
71+
8372| Namespace | Vars | Description |
8473| --------------------| ------| --------------------------------|
8574| clojure.core | 593 | Core language functions |
@@ -117,11 +106,10 @@ Call WebAssembly modules directly from Clojure:
117106- v128 SIMD operations
118107- Predecoded IR with superinstructions for optimized dispatch
119108
120- > ** Performance note** : The Wasm runtime is a pure interpreter (no JIT).
121- > It is approximately 10-30x slower than wasmtime for compute-heavy modules,
122- > though module load time is faster (~ 4ms vs ~ 5ms). For applications where
123- > Wasm execution speed is critical, JIT compilation or wasmtime integration
124- > are planned as future optimization paths.
109+ > ** Performance note** : The Wasm runtime is a pure interpreter (no JIT),
110+ > approximately 10-30x slower than wasmtime for compute-heavy modules.
111+ > Module load time is faster (~ 4ms vs ~ 5ms). Wasm JIT compilation and
112+ > wasmtime integration are planned as future optimization paths.
125113
126114### Server & Networking
127115
@@ -145,7 +133,7 @@ Call WebAssembly modules directly from Clojure:
145133
146134- ** NaN-boxed Value** — 8-byte tagged representation (float pass-through, i48 integer, 40-bit heap pointer)
147135- ** MarkSweep GC** — allocation tracking, free-pool recycling, safe points
148- - ** Bytecode VM** — 50+ opcodes, superinstructions, fused branch ops
136+ - ** Bytecode VM** — 75 opcodes, superinstructions, fused branch ops
149137- ** ARM64 JIT** — hot integer loop detection with native code generation
150138- ** Bootstrap cache** — core.clj pre-compiled at build time (~ 4ms restore)
151139- ** Zero-config projects** — auto-detect ` src/ ` , ` cljw.edn ` optional
@@ -172,17 +160,19 @@ src/
172160├── repl/ nREPL server, line editor
173161└── wasm/ WebAssembly runtime (461 opcodes)
174162
175- bench/ 27 benchmarks, multi-language
176- test/ 62 Clojure test files (38 upstream ports)
163+ bench/ 31 benchmarks, multi-language
164+ test/ 62 Clojure test files (39 upstream ports)
177165```
178166
167+ The [ ` .dev/ ` ] ( .dev/ ) directory contains design decisions, optimization logs,
168+ and development notes. Some may be outdated, but may interest those curious
169+ about how the project evolved.
170+
179171## Benchmarks
180172
181- The benchmark suite is in [ ` bench/benchmarks/ ` ] ( bench/benchmarks/ ) with 27 programs
173+ The benchmark suite is in [ ` bench/benchmarks/ ` ] ( bench/benchmarks/ ) with 31 programs
182174covering computation, collections, higher-order functions, GC pressure, and Wasm.
183175
184- Run them yourself:
185-
186176``` bash
187177# Requires hyperfine
188178bash bench/run_bench.sh # All benchmarks (ReleaseSafe)
@@ -197,59 +187,47 @@ zig build test # 1,300+ Zig test blocks
197187bash test/e2e/run_e2e.sh # End-to-end tests
198188```
199189
200- 62 Clojure test files including 38 upstream test ports with 729 deftests.
190+ 62 Clojure test files including 39 upstream test ports with 735 deftests.
201191All tests verified on both VM and TreeWalk backends.
202192
203193## Future Plans
204194
205- Active development areas for future releases:
206-
207- - ** Wasm FFI acceleration** — the built-in Wasm interpreter is ~ 10-30x slower
208- than wasmtime (JIT) for compute-heavy workloads. Planned approaches include
209- Wasm JIT compilation and optional wasmtime integration via its C API
195+ - ** Wasm FFI acceleration** — Wasm JIT compilation and optional wasmtime
196+ integration via its C API
210197- ** JIT expansion** — float operations, function calls, broader loop patterns
211198- ** Concurrency** — future, pmap, agent via Zig thread pool
212199- ** Generational GC** — nursery/tenured generations for throughput
213200- ** Dependency management** — deps.edn compatible (git/sha deps)
214201- ** Persistent data structures** — HAMT/RRB-Tree implementations
215202- ** wasm_rt** — compile Clojure to run * inside* WebAssembly
216203
217- ## Acknowledgments
218-
219- ClojureWasm is built with deep appreciation for [ Clojure] ( https://clojure.org/ )
220- and the work of [ Rich Hickey] ( https://github.com/richhickey ) . Clojure's design
221- — immutable data, functional programming, and a pragmatic approach to state —
222- has been a constant source of inspiration. Programming in Clojure is genuinely
223- enjoyable, and the community's passion and thoughtfulness make it one of the
224- most rewarding ecosystems to be part of. May Clojure continue to thrive for
225- many years to come.
226-
227- This project also builds on the excellent work of the [ Zig] ( https://ziglang.org/ )
228- community. Zig's emphasis on simplicity and explicit control made it possible
229- to implement a full language runtime in a single, small binary.
204+ ## Potential Use Cases
230205
231- ClojureWasm ports test cases from the Clojure test suite (EPL-1.0) and includes
232- Clojure standard library code adapted for the Zig runtime. See [ NOTICE] ( NOTICE )
233- for attribution details.
206+ Once production-ready, ClojureWasm could enable workloads where the JVM
207+ is too heavy:
234208
235- ## Contributing
209+ - ** Serverless functions** — ~ 3MB image + ~ 4ms cold start for AWS Lambda
210+ or Fly.io, eliminating JVM warm-up penalties
211+ - ** Wasm plugin host** — embed user-supplied .wasm modules as extensibility
212+ points (e.g., Cloudflare Workers-style logic, game scripting)
213+ - ** Edge / IoT** — run Clojure on Raspberry Pi or resource-constrained
214+ devices where a JVM runtime is impractical
236215
237- See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for build instructions, code style, and
238- development workflow.
239-
240- Issues are welcome. For larger changes, please open an issue first to discuss
241- the approach.
242-
243- ## Support
244-
245- ClojureWasm is developed and maintained by a single developer. If you find
246- this project useful, your support would be greatly appreciated and helps
247- keep development going.
216+ ## Acknowledgments
248217
249- [ ![ GitHub Sponsors] ( https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa )] ( https://github.com/sponsors/chaploud )
218+ Built on [ Clojure] ( https://clojure.org/ ) by Rich Hickey and
219+ [ Zig] ( https://ziglang.org/ ) by Andrew Kelley. Includes adapted Clojure
220+ standard library code and ported test cases (EPL-1.0).
221+ See [ NOTICE] ( NOTICE ) for attribution details.
250222
251223## License
252224
253225[ Eclipse Public License 1.0] ( LICENSE ) (EPL-1.0)
254226
255227Copyright (c) 2026 chaploud
228+
229+ ## Support
230+
231+ Developed in spare time alongside a day job. If you'd like to support
232+ continued development, sponsorship is welcome via
233+ [ GitHub Sponsors] ( https://github.com/sponsors/chaploud ) .
0 commit comments