Developer ThatXliner released rlisp, a transpiler that enables writing Rust code using s-expression (LISP) syntax instead of Rust's traditional curly-brace syntax. Posted to Hacker News on May 9, 2026, as "Show HN: Rust but Lisp," the project gained 171 points and 68 comments while accumulating 88 stars on GitHub.
Three-Stage Compilation Process Preserves Rust Semantics
The transpiler works through three stages: s-expressions → Rust source files → binary executables. As the README explains, "Ownership, borrowing, lifetimes, generics, traits, pattern matching — all expressed as s-expressions. rustc still does type checking, borrow checking, and optimization. rlisp just handles the syntax."
For example, the LISP syntax (struct Point (x f64) (y f64)) transpiles to the Rust equivalent struct Point { x: f64, y: f64 }. The system supports functions, structs, enums, traits, impl blocks, pattern matching, control flow, closures, modules, visibility modifiers, lifetimes, generics, and macros.
Macros Simplified as S-Expression Functions
The creator positions rlisp as "a weekend project, not a production compiler," but highlights three compelling aspects:
- Macro simplicity: "Macros are just functions from s-expressions to s-expressions" using quasiquote and unquote, avoiding proc_macro complexity
- Structural safety: S-expressions are inherently balanced, making it impossible to leave dangling braces
- Syntactic uniformity: Function signatures and match arms use identical syntax, reducing cognitive load
Inline Rust Escapes for Unsupported Features
The transpiler includes inline Rust escapes for syntax not yet supported in the s-expression format, allowing developers to mix both syntaxes when needed. The project is MIT licensed and available on GitHub, offering developers an alternative way to explore Rust's powerful type system and ownership model through familiar LISP-style syntax.
Key Takeaways
- rlisp transpiles s-expression LISP syntax to Rust source code while preserving all Rust semantics
- The three-stage compilation (s-expressions → Rust → binary) allows rustc to handle type checking and optimization
- Macros are simplified to functions from s-expressions to s-expressions, avoiding Rust's proc_macro complexity
- S-expression syntax provides inherent structural safety with balanced parentheses instead of potentially mismatched braces
- The MIT-licensed weekend project gained 171 Hacker News points and 88 GitHub stars