Squint
Squint is “a light-weight dialect of ClojureScript with a compiler and standard library.” It lets you write ClojureScript syntax but emits lightweight JavaScript, explicitly trading Clojure’s semantics for small bundle size and native-JS interop squint.
The project frames itself narrowly: it is not a full ClojureScript replacement but “a tool to target JS when you need something more light-weight in terms of interop and bundle size.” Stated target scenarios are exactly the byte-/startup-sensitive edges this wiki cares about — “CloudFlare workers, node scripts, GitHub actions, etc. that need the extra performance, startup time and/or small bundle size.” squint
How it stays light
The core design choice: Squint compiles Clojure data structures to built-in JavaScript data structures rather than shipping custom persistent/immutable collections. Maps become plain JS objects, vectors/sequences become arrays (using JS’s native iteration protocols), and keywords compile to plain strings squint. Full ClojureScript ships its own immutable-collection runtime; dropping that is what shrinks the output and removes the interop friction. The trade is explicit: instead of immutable persistent structures, Squint’s update functions return new shallow copies, so you give up Clojure’s immutability guarantees. This is a concrete instance of bundle-size minimalism applied at the language/tooling layer.
Sibling —
cherry: the same project offerscherryfor those who want Squint’s compile-to-JS approach but with “the normal ClojureScript standard library and data structures.” Cherry keeps the persistent collections (and their runtime weight); Squint is the byte-budget-first variant. The two bracket the bundle-size/semantics trade-off.
Features
- ES-module-compatible output
- JSX and HTML template support
- async/await and generator support
- macro system via SCI (Small Clojure Interpreter)
- browser and console REPL environments
- integrates with React, Vue, Solid, and other modern JS frameworks
Relation to this wiki’s thesis
Squint attacks page weight from a different direction than landing-page-14kb. The 14 KB case minimizes by hand-authoring less (drop JS, system fonts, inline SVG); Squint minimizes by changing the compiler so a high-level source language still emits small JS. Both accept a trade — the 14 KB page gives up rich interactivity; Squint gives up ClojureScript’s immutable semantics — to land under a tight bundle-size budget. It is the wiki’s first source addressing interactive / app code rather than static pages, and the first to engage the “is the 14 KB floor only for static landing pages?” open question by tooling its way toward small bundles. (Caveat: GitHub-README claims, not benchmarked here.)