<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-05-19T06:27:03+05:30</updated><id>/feed.xml</id><title type="html">Clofer Blogs</title><subtitle>This might go nowhere. Just curious to learn about programming languages. Hence am trying to port Clojure on top of Rust. Here, I will share my journey and learning about Clojure and Rust. My ignorance is immense, my laziness is legendary, hence there is a high chance of this project failing.</subtitle><entry><title type="html">Clofer: Clojure, Forged in Iron</title><link href="/2026/05/18/clofer.html" rel="alternate" type="text/html" title="Clofer: Clojure, Forged in Iron" /><published>2026-05-18T00:00:00+05:30</published><updated>2026-05-18T00:00:00+05:30</updated><id>/2026/05/18/clofer</id><content type="html" xml:base="/2026/05/18/clofer.html"><![CDATA[<table>
  <thead>
    <tr>
      <th style="text-align: center"><img src="/img/logo_small.png" alt="" /></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center">Clofer: Clojure, Forged in Iron</td>
    </tr>
  </tbody>
</table>

<p><em>Clojure + Fe · KLOH-fer · A new host for an refeshing idea</em></p>

<blockquote>
  <p>⚠️ <strong>Honest warning from the author</strong></p>

  <p>This might go nowhere. I’m just curious to learn about programming languages — so I’m trying to port Clojure on top of Rust. Here, I’ll share my journey and learnings about Clojure and Rust. My ignorance is immense, my laziness is legendary, and hence there is a high chance of this project failing. You have been warned.</p>
</blockquote>

<p>What happens when you take one of the most elegant programming languages ever designed — one built around simplicity, immutability, and expressive power — and free it from the platform it was born on?</p>

<p>That’s the question behind <strong>Clofer</strong>: an experiment to port Clojure on top of Rust, giving Clojure a new home that is fast, lightweight, and owned by no corporation.</p>

<blockquote>
  <p><em>“Clojure is a beautiful language trapped in a political dependency. Clofer is Clojure finally free.”</em></p>
</blockquote>

<h2 id="what-is-clofer">What is Clofer?</h2>

<p>The name says it all: <strong>Clo</strong>jure + <strong>Fe</strong> — the chemical symbol for iron, which is what Rust is named after (rust = oxidised iron). Say it out loud: <em>KLOH-fer</em>. Sounds like Clojure’s sibling. That’s intentional.</p>

<p>Clofer is an attempt to implement the Clojure programming language on top of Rust, instead of on top of the Java Virtual Machine. You write Clojure. It runs natively — no JVM, no Oracle, no 2-second cold start.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>JVM Clojure  →  ClojureScript  →  Clofer
</code></pre></div></div>

<p>Rich Hickey designed Clojure as a <em>hosted</em> language — one that lives inside another platform and borrows its infrastructure. JVM Clojure lives on Java. ClojureScript lives on JavaScript. Clofer would be the n<sup>th</sup> landing: Clojure hosted on Rust, and for the first time, on a platform owned by no evil corporation and driven by no garbage collector.</p>

<div class="language-clojure highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">; You write ordinary Clojure...</span><span class="w">
</span><span class="p">(</span><span class="k">defn</span><span class="w"> </span><span class="n">greet</span><span class="w"> </span><span class="p">[</span><span class="nb">name</span><span class="p">]</span><span class="w">
  </span><span class="p">(</span><span class="nb">str</span><span class="w"> </span><span class="s">"Hello, "</span><span class="w"> </span><span class="nb">name</span><span class="w"> </span><span class="s">"!"</span><span class="p">))</span><span class="w">

</span><span class="p">(</span><span class="nf">greet</span><span class="w"> </span><span class="s">"Clofer"</span><span class="p">)</span><span class="w">  </span><span class="c1">; =&gt; "Hello, Clofer!"</span><span class="w">
</span></code></pre></div></div>

<h2 id="who-is-building-this">Who is building this?</h2>

<p>Clofer is being built by me, <strong><a href="https://mindaslab.github.io">Karthikeyan A K</a></strong>, a Ruby on Rails developer and Clojure evangelist based in Chennai. You might know me from <strong><a href="https://injee.codeberg.page">Injee</a></strong>—my project to automatically generate backends so developers can focus on frontend work.</p>

<p>The story of Clofer starts where many good side projects do: curiosity. A former employer asked me to learn ReactJS. That kicked off a journey into frontend development—and into wondering why building the backend side of things had to be so painful. That frustration became Injee, which I wrote in Clojure, the most elegant language I knew.</p>

<p>People in the Clojure community might know me from <a href="https://youtube.com/@clojurediary">Clojure Diary</a> and <a href="https://clojure-book.gitlab.io">Clojure Book</a>.</p>

<p>And somewhere along the way, the question of <em>programming languages themselves</em> took hold. What makes a language elegant? What makes it fast? Why is Clojure so beautiful, and why is it still chained to the JVM? What would it look like to free it?</p>

<p>Clofer is my attempt to find out — by building it myself.</p>

<h2 id="why-does-this-matter">Why does this matter?</h2>

<p>JVM Clojure is genuinely excellent. But hosting on the JVM comes with costs that aren’t always visible until you hit them.</p>

<p><strong>Cold start time.</strong> A JVM Clojure application can take 2–10 seconds to start. That kills it for CLI tools, serverless functions, and any short-lived process. Rust-based binaries start in milliseconds.</p>

<p><strong>Memory footprint.</strong> A JVM app typically needs 256MB+ just to breathe. Clofer could, in principle, run in a few megabytes — making it viable for IoT devices, edge computing, and environments where compute is expensive.</p>

<p><strong>True tail call optimisation.</strong> The JVM doesn’t support TCO natively, which is why Clojure requires the <code class="language-plaintext highlighter-rouge">recur</code> workaround. A Rust-based Clojure could have real TCO, making it a more complete and elegant Lisp.</p>

<p><strong>No GC pauses.</strong> Rust’s ownership model means no stop-the-world garbage collection. For latency-sensitive systems — real-time audio, trading, game engines — this matters enormously.</p>

<p><strong>Freedom from Oracle.</strong> This one doesn’t get talked about enough. Oracle’s stewardship of Java has cast a long shadow — licensing changes, the decade-long Google lawsuit, constant uncertainty. Even GraalVM (the community’s current answer to JVM cold start) is also an Oracle product. Hosting on Rust means hosting on a language governed by a nonprofit, with no licensing drama and no corporate owner to answer to.</p>

<h2 id="where-clofer-would-be-useful">Where Clofer would be useful</h2>

<table>
  <thead>
    <tr>
      <th>Use case</th>
      <th>Why Clofer fits</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><strong>CLI tools</strong></td>
      <td>Fast startup, small binary, no JVM required on the target machine</td>
    </tr>
    <tr>
      <td><strong>Serverless functions</strong></td>
      <td>Cold start is death in serverless; millisecond boot changes the equation</td>
    </tr>
    <tr>
      <td><strong>WebAssembly</strong></td>
      <td>Clojure in the browser natively — not via ClojureScript transpilation</td>
    </tr>
    <tr>
      <td><strong>Embedded systems</strong></td>
      <td>Rust already runs on ARM Cortex-M, RISC-V, ESP32; Clofer could inherit that</td>
    </tr>
    <tr>
      <td><strong>Data science &amp; ML</strong></td>
      <td>Clojure’s data-oriented model + Rust’s GPU ecosystem is a compelling combination</td>
    </tr>
    <tr>
      <td><strong>Systems programming</strong></td>
      <td>Rust’s borrow checker eliminates whole classes of bugs at compile time</td>
    </tr>
    <tr>
      <td><strong>Learning &amp; research</strong></td>
      <td>Even if nothing ships, building this teaches you more than almost anything else</td>
    </tr>
    <tr>
      <td><strong>Where Clojure is used currently</strong></td>
      <td>Clojure is used in a wide range of industries, including finance, healthcare, and education</td>
    </tr>
  </tbody>
</table>

<h2 id="data-science-and-machine-learning">Data Science and Machine Learning</h2>

<p>Clojure has always had a natural affinity for data. Its core abstractions — immutable data structures, lazy sequences, the sequence abstraction — map beautifully onto the kind of data transformation pipelines that data science is built on. Libraries like <code class="language-plaintext highlighter-rouge">clojure.data</code> and the broader data-oriented programming philosophy make Clojure genuinely pleasant for exploratory data work.</p>

<p>The problem is the JVM. In data science, you often want to run models at the edge, inside a browser, on a small device, or as a lightweight CLI tool that processes a CSV and exits. The JVM’s memory and startup overhead make all of that awkward.</p>

<p>Clofer on Rust changes the equation. Rust has a growing and serious ML ecosystem: <strong><a href="https://github.com/huggingface/candle">Candle</a></strong> (HuggingFace’s ML framework written in pure Rust with GPU support) and <strong><a href="https://burn.dev/">Burn</a></strong> (a deep learning framework with multiple backends) are both gaining traction fast. Rust also has solid bindings to CUDA for NVIDIA GPUs, and <code class="language-plaintext highlighter-rouge">wgpu</code> for cross-platform GPU compute that works on Vulkan, Metal, DirectX, and even WebAssembly.</p>

<p>Imagine writing data pipelines in Clojure’s expressive, REPL-driven style — and having them run with Rust’s performance and memory efficiency, with access to GPU acceleration underneath. That’s not science fiction; it’s the direction Clofer points toward.</p>

<h2 id="webassembly">WebAssembly</h2>

<p>WebAssembly is one of the most exciting deployment targets in software right now — and one where Clojure is currently underserved.</p>

<p>ClojureScript gets you Clojure in the browser, but via transpilation to JavaScript. It works well, but it inherits JavaScript’s runtime, JavaScript’s performance characteristics, and the complexity of the JS toolchain.</p>

<p>Rust compiles to WebAssembly cleanly and natively. A Clofer that inherits Rust’s WASM story could give you Clojure running directly in the browser as a native binary — faster than ClojureScript, with a smaller footprint, and without any JavaScript dependency. The same Clofer code could run on your server, your CLI, and inside a browser tab.</p>

<p>This matters beyond the browser too. WASM is increasingly used as a sandboxed execution environment on the server side (Cloudflare Workers, Fastly Compute, and others use it). Clofer could make Clojure a first-class citizen in that world.</p>

<h2 id="embedded-systems">Embedded Systems</h2>

<p>This is perhaps the most dramatic frontier Clofer opens up.</p>

<p>Clojure has never been able to run on microcontrollers. The JVM is simply too heavy — it needs megabytes of RAM and a full operating system. Racket, despite its elegance, faces similar constraints. The Lisp family has largely been locked out of the embedded world.</p>

<p>Rust changed the story for systems programmers. It already runs on ARM Cortex-M, RISC-V, ESP32, and dozens of other embedded targets — without an operating system, with deterministic memory, and with a runtime measured in kilobytes. It has become the language of choice for serious embedded work precisely because it gives you C-level control with modern safety guarantees.</p>

<p>Clofer, built on Rust, could inherit all of that. A Clojure that compiles down to a tight native binary with no GC, no JVM, and no OS dependency could run on the same microcontrollers that Rust already targets. That would be genuinely unprecedented — a Lisp-family language with Clojure’s elegant data model running on an ESP32 or an ARM Cortex-M4.</p>

<p>The embedded world is crying out for higher-level, more expressive languages that don’t sacrifice performance or determinism<sup id="fnref:1"><a href="#fn:1" class="footnote" rel="footnote" role="doc-noteref">1</a></sup>. Rust is filling that gap for systems programmers. Clofer could fill it for the functional programming community.</p>

<h2 id="whats-being-built-and-what-itll-take">What’s being built, and what it’ll take</h2>

<p>Implementing a language is genuinely hard. Clojure’s dynamic nature is philosophically at odds with how Rust works — every step forward requires navigating that tension. The existing <a href="https://github.com/clojure-rs/ClojureRS">ClojureRS</a> project (the closest precedent) stalled partly because of this: Rust’s static, compile-time-verified nature resists the kind of runtime reflection Clojure relies on.</p>

<p>The roadmap, roughly:</p>

<ol>
  <li>Learn Rust deeply — ownership, enums, traits, the borrow checker</li>
  <li>Understand interpreter and compiler theory — parsing, evaluation, persistent data structures</li>
  <li>Study Clojure’s internals — how namespaces, vars, macros, and STM actually work</li>
  <li>Start small — a reader, an evaluator, a REPL</li>
</ol>

<p>It’s a multi-year undertaking, honestly. But that’s also what makes it interesting.</p>

<blockquote>
  <p><em>The biggest gift to the world might not be the runtime characteristics at all. It might be proving that a beautiful, expressive Lisp can exist without a managed runtime.</em></p>
</blockquote>

<h2 id="follow-along">Follow along</h2>

<p>I will be sharing the journey here—what I’m learning about Clojure, what I’m learning about Rust, where the project hits walls, and what it feels like to explore a problem this large with no guarantee of success.</p>

<p>The project is called <strong>Clofer</strong>. Say it like Clojure’s sibling. Because that’s what it’s trying to become.</p>

<p><strong>Foot Notes</strong></p>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1">
      <p>https://ferret-lang.org/ <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>Karthikeyan A K</name></author><summary type="html"><![CDATA[Clofer: Clojure, Forged in Iron]]></summary></entry></feed>