An ahead-of-time compiler for ANSI Common Lisp that produces native Linux x86-64 binaries — no assembler, linker, or C runtime required.
This compiler — and this page — were built through vibe coding.
lispc is an ahead-of-time (AOT) compiler for a substantial subset of
ANSI Common Lisp. Written in Go, it reads .lisp source files and emits
statically linked ELF binaries that run on Linux x86-64 with absolutely no runtime
dependencies — no libc, no shared libraries, no interpreter.
The compiler is a single static binary with the standard library embedded.
Just put it on your PATH and compile Lisp programs anywhere.
No environment variables, config files, or installation steps required.
Source code flows through a single-pass pipeline. The code generator emits raw x86-64 machine code using a stack-based evaluation model, and the ELF writer wraps it in a minimal valid ELF64 header to produce a directly executable binary.
Implements a broad subset: defun, defmacro,
CLOS, conditions & restarts, loop, format,
hash tables, structures, sequences, and more.
Generates raw x86-64 instructions directly — no intermediate assembly, no C compilation, no interpreter overhead.
Output is a self-contained ELF executable. No libc, no dynamic linking. Copy the binary anywhere and it just runs.
Cooperative green threads with thread-spawn,
thread-yield, and vt-sleep-ms. Backed by
an epoll-based scheduler for efficient I/O multiplexing.
Built-in TCP sockets, DNS resolution, and HTTP support via direct Linux syscalls. Build web servers and clients in pure Lisp.
Raw terminal mode, ANSI escape sequences, UTF-8 output, and signal handling for building rich console applications.
# Requires Go 1.21+ and Linux x86-64
git clone https://github.com/yourusername/lispc.git
cd lispc
go build -o bin/lispc ./cmd/lispc
# Write a program cat > hello.lisp <<'EOF' (defun greet (name) (format t "Hello, ~a!~%" name)) (greet "World") EOF # Compile to native binary ./bin/lispc hello.lisp -o hello # Run it ./hello # => Hello, World!
A TCP echo server with virtual threads — compiled to a single static binary:
(defun handle-client (fd) (let ((buf (make-string 1024))) (loop (let ((n (vt-recv fd buf 1024 0))) (when (<= n 0) (return)) (vt-send fd buf n 0)))) (syscall-close fd)) (defun main () (let ((sock (tcp-listen "0.0.0.0" 8080))) (format t "Listening on :8080~%") (loop (let ((client (vt-accept sock))) (thread-spawn (lambda () (handle-client client)))))))
Full applications built with lispc, demonstrating real-world use cases:
Console chess with Unicode board, negamax AI, and ANSI colors
Korean board game with animated Yut sticks and rich terminal UI
HTTP server handling requests with virtual threads
Terminal web browser with TLS, HTML parsing, and page navigation
This project was built collaboratively with AI. The compiler, standard library, example applications, and this page were all written through conversation with an LLM, iterating on code until things worked.