What Is rlisp?
rlisp is a Lisp-to-Rust transpiler built by ThatXliner. It turns s-expressions into .rs files and then binaries through a 3-stage pipeline for Rust devs, compiler hackers, and Lisp-curious tinkerers who want rustc semantics without Rust syntax. rlisp is one of the best Lisp-to-Rust Transpilers tools for Rust devs who want to experiment with macros, borrowing, and structural editing. It is a weekend project, not a production compiler, and the issue tracker is open for missing syntax and edge cases.
Quick Overview
| Attribute | Details |
|---|---|
| Type | Lisp-to-Rust Transpilers |
| Best For | Rust devs, compiler hackers, and Lisp enthusiasts |
| Language/Stack | Rust, s-expressions, rustc, Ariadne diagnostics |
| License | N/A |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A |
Who Should Use rlisp?
- Rust macro experimenters who want to prototype syntax transformations without writing
proc_macrocrates or token-stream plumbing. - Compiler hackers who want a small, inspectable front end that lowers Lisp forms into real Rust and lets
rustchandle the hard parts. - Lisp-oriented developers who prefer balanced parentheses, uniform forms, and compile-time code generation with
quasiquoteandunquote. - Indie hackers building throwaway tools or demos where syntax experimentation matters more than ecosystem completeness.
Not ideal for:
- Production compiler work that needs full Rust syntax coverage, stable tooling, and long-term maintenance guarantees.
- Teams tied to IDE-first Rust workflows that depend heavily on mature editor integration, refactors, and language-server polish.
- Libraries that must target every Rust edge case today because the project openly says some syntax is still missing.
Key Features of rlisp
- S-expression front end — You write forms like
(struct Point ...),(fn main ...), and(match ...), then rlisp lowers them into valid Rust source. The syntax map covers structs, enums, impls, traits, loops, closures, modules, and control flow. rustcstays in charge — rlisp does not replace the Rust compiler. It emits Rust and then relies onrustcfor type checking, borrow checking, optimization, and code generation, which keeps semantics aligned with native Rust.- Compile-time macros as functions — rlisp macros are ordinary functions from s-expressions to s-expressions, so you do not need
proc_macro,syn, orquotefor many transformations. The model is closer to Lisp than to Rust token manipulation. - Inline Rust escape hatch — The
(rust "...")form lets you inject raw Rust where the Lisp syntax does not yet express a feature cleanly. That is useful for niche constructs, migration gaps, and quick experiments. - Structured syntax support — The project explicitly documents lifetimes, turbofish, visibility modifiers,
if-let,while-let,unsafe, and module declarations. That makes rlisp useful for testing how far a Lisp surface can go before you need native Rust syntax. - Better parse diagnostics — rlisp uses Ariadne for pretty error messages, which matters when your front end is parsing nested lists instead of braces and semicolons. The result is easier debugging than raw parser panics.
- Balanced form ergonomics — S-expressions are always balanced, so structural editing is simpler and brace-related syntax errors disappear. That matters if you use editors like MiniVim or any workflow built around subtree manipulation.
rlisp vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| rlisp | Lisp syntax over Rust semantics | Compile-time s-expression transformer that emits Rust source | Open-Source |
| Native Rust | Maximum compatibility and ecosystem support | No translation layer; direct language support and best IDE coverage | Open-Source |
| macro_rules! / proc_macro | Macros without a custom front end | Stays inside standard Rust tooling and compiler hooks | Open-Source |
| syn + quote | Procedural macro authors and code generators | Standard AST parsing and token emission for Rust tooling | Open-Source |
Pick native Rust if your priority is editor support, onboarding, and zero surprise for the rest of the Rust ecosystem. Pick rlisp when you want to explore a Lisp surface while keeping rustc semantics intact.
Choose macro_rules! or proc_macro if you only need compile-time metaprogramming inside ordinary Rust crates. Those options are better when you need compatibility with cargo workspaces, stable idioms, and compiler-recognized macros.
Choose syn + quote if you are building generators, codemods, or custom derive logic that must operate on Rust syntax trees. If your real workflow is inspecting generated output, pair rlisp with Claude Code Canvas for editing passes or Ghist for reviewing diffs.
How rlisp Works
rlisp reads an s-expression tree, maps each form to a Rust construct, and then prints Rust source that rustc can compile. The core abstraction is deliberately small: lists, symbols, atoms, and a few special forms such as quasiquote, unquote, and unquote-splicing. That keeps macro expansion predictable because a macro is just a function over syntax trees instead of a token-level compiler plugin.
The design is opinionated in one important way: syntax translation is not the same thing as semantic replacement. rlisp handles the front end, but it still delegates ownership rules, borrow checking, trait resolution, and optimization to the Rust toolchain. That means generated code behaves like regular Rust after lowering, and it also means the project can expose features like lifetimes, control flow, visibility, and modules without reimplementing the back end.
rlisp compile path/to/file.lisp
rlisp build path/to/file.lisp
rlisp run path/to/file.lisp
The first command writes Rust source, the second compiles the generated .rs file with rustc, and the third compiles and executes the binary. If you want to inspect output during development, start with compile so you can diff the emitted Rust before you hand it to the compiler.
Pros and Cons of rlisp
Pros:
- Keeps Rust semantics intact by delegating type checking and borrow checking to
rustcinstead of reimplementing them. - Fast macro experimentation because macros are s-expression transformers, not token-stream boilerplate.
- Wide surface coverage for common Rust constructs like structs, enums, traits, modules, closures, loops, and pattern matching.
- Inline Rust fallback via
(rust "...")so syntax gaps do not block experimentation. - Cleaner structural editing because balanced parentheses eliminate brace matching errors.
- Readable parser errors thanks to Ariadne-backed diagnostics instead of opaque parse failures.
Cons:
- Not production complete; the project explicitly says some Rust syntax is still missing.
- Tooling ecosystem is smaller than native Rust, so editor integration and refactoring support will lag behind mainstream workflows.
- Generated code adds a translation step that can make debugging slower if you are not comfortable reading emitted Rust.
- Project maturity is limited because the author describes it as a weekend project rather than a finished compiler.
- Not ideal for standard Rust teams that need conventional source files, linting, and familiar onboarding paths.
Getting Started with rlisp
Clone the repo, build the CLI from source, and run it against a Lisp file that contains rlisp forms. The install path is the simplest path because the project is already structured as a Cargo crate.
git clone https://github.com/ThatXliner/rlisp.git
cd rlisp
cargo install --path .
rlisp run path/to/file.lisp
After installation, rlisp will transpile the input into Rust, invoke the Rust toolchain, and execute the binary if you chose run. No extra service, daemon, or config file is required for the basic workflow, which makes it easy to test inside a throwaway repo or a scratch directory.
Verdict
rlisp is the strongest option for experimenting with Lisp syntax over Rust when you want rustc to keep doing the hard parts. Its main strength is semantic fidelity with a very small compiler front end; its main caveat is incomplete syntax coverage. If you want a weekend-sized transpiler for learning, prototyping, or macro research, rlisp is worth trying.



