A ClojureScript-to-JavaScript compiler written in TypeScript. Zero dependencies.
Kiso (基礎) — foundation in Japanese.
| Package | Description | Size |
|---|---|---|
@clojurewasm/kiso | Compiler + runtime | ~146 KB |
@clojurewasm/su | Component framework | ~21 KB |
Live Showcase — interactive demos with source code and compiled JS output.
npm install @clojurewasm/kiso @clojurewasm/su
npm install -D vitevite.config.js:
import{cljs}from'@clojurewasm/kiso/vite';exportdefault{plugins: [cljs()]};src/main.cljs:
(nsmy.app
(:require [su.core :as su :refer [defcdefstyle]]))
(defstyleapp-styles
[:.counter {:display"flex":gap"8px":align-items"center"}])
(defcmy-counter
{:style [app-styles]}
[]
(let [n (atom0)]
[:div.counter
[:button {:on-click (fn [_] (swap! n dec))} "-"]
[:span (str @n)]
[:button {:on-click (fn [_] (swap! n inc))} "+"]]))
(su/mount (js/document.getElementById"app") [::my-counter])npx vite(defngreet [name] ;; → export let greet = function greet(name) {
(str"Hello, " name "!")) ;; return str("Hello, ", name, "!"); };
(nsmy.app;; → import * as u from './util.js';
(:require [my.util :as u]))
(.toUpperCase"hello") ;; → "hello".toUpperCase()
(.-length"hello") ;; → "hello".length
(js/console.log"hi") ;; → console.log("hi")
[123] ;; → vector(1, 2, 3)
{:a1} ;; → hashMap(keyword("a"), 1)import{compile}from'@clojurewasm/kiso/compiler';const{ code }=compile('(defn add [a b] (+ a b))');npx kiso compile src/ --out-dir dist/ --source-mapSee docs/ for the full guide, API reference, and cookbook.
- Task Manager — full app with components, context, and styling
npm install && npm run build
npm test# 1500+ vitest + Playwright E2E
npm run typecheck