---
title: "nREPL and ClojureScript: Demystifying Piggieback"
url: https://daily.dev/posts/nrepl-and-clojurescript-demystifying-piggieback-1ww1joldp
source_url: https://metaredux.com/posts/2026/07/01/demystifying-piggieback.html
type: article
source: "Meta Redux"
published: 2026-07-01T10:35:02.013Z
updated: 2026-07-01T10:35:27.765Z
tags: ["clojure"]
reading_time: 17
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# nREPL and ClojureScript: Demystifying Piggieback

**[Meta Redux](https://daily.dev/sources/metaredux)** · 17 min read · 0 upvotes · 0 comments

## Summary

A deep-dive into Piggieback, the nREPL middleware that enables ClojureScript evaluation over a standard nREPL server. The author explains how Piggieback hijacks nREPL sessions to reroute eval messages to a JavaScript runtime (Node, browser, etc.) via ClojureScript's IJavaScriptEnv protocol, without requiring any client-side changes. Key internals covered include session-based dispatch, the DelegatingReplEnv trick to prevent premature teardown, how the compiler environment is stashed for use by tools like cider-nrepl, and the two distinct code paths for REPL setup vs. steady-state evaluation. The post also covers known limitations (one Node REPL per JVM, no interrupt support, multi-form eval), contrasts Piggieback's approach with shadow-cljs, and summarizes recent 0.6.x/0.7.0 bug fixes and refactoring work done as part of the CIDER 2.0 effort.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://metaredux.com/posts/2026/07/01/demystifying-piggieback.html>

## Similar posts on daily.dev

- [Clojurists Together Update: May and June 2026](https://daily.dev/posts/clojurists-together-update-may-and-june-2026-ngmznmylq) · Meta Redux · 0 upvotes · 0 comments
- [nREPL Forever](https://daily.dev/posts/nrepl-forever-rvhvow2fs) · Bozhidar Batsov · 0 upvotes · 0 comments
- [Port: a minimalist prepl client for Emacs](https://daily.dev/posts/port-a-minimalist-prepl-client-for-emacs-hduonpn7a) · Bozhidar Batsov · 0 upvotes · 0 comments

---

Tags: [#clojure](https://daily.dev/tags/clojure)

[View this post on daily.dev](https://daily.dev/posts/nrepl-and-clojurescript-demystifying-piggieback-1ww1joldp)
