Skip to content
This repository was archived by the owner on Aug 12, 2026. It is now read-only.

Repository files navigation

Kiso

CInpm kisonpm sulicenseGitHub Sponsors

A ClojureScript-to-JavaScript compiler written in TypeScript. Zero dependencies.

Kiso (基礎) — foundation in Japanese.

PackageDescriptionSize
@clojurewasm/kisoCompiler + runtime~146 KB
@clojurewasm/suComponent framework~21 KB

Live Showcase — interactive demos with source code and compiled JS output.

Quick Start

npm install @clojurewasm/kiso @clojurewasm/su
npm install -D vite

vite.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

What Compiles to What?

(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)

Compiler API

import{compile}from'@clojurewasm/kiso/compiler';const{ code }=compile('(defn add [a b] (+ a b))');
npx kiso compile src/ --out-dir dist/ --source-map

Documentation

See docs/ for the full guide, API reference, and cookbook.

Examples

  • Task Manager — full app with components, context, and styling

Development

npm install && npm run build
npm test# 1500+ vitest + Playwright E2E
npm run typecheck

License

MIT

About

ClojureScript-to-JavaScript compiler in TypeScript. Zero dependencies.

Topics

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages