HeadlinesBriefing favicon HeadlinesBriefing.com

rlisp brings Lisp syntax to Rust without runtime overhead

Hacker News •
×

The rlisp project turns Rust’s ownership model into a pure s‑expression language. Hosted at ThatXliner/rlisp, the tool parses Lisp‑style forms and emits ordinary .rs files, which rustc then type‑checks, borrows, and optimizes. No runtime or garbage collector is added; the generated binary is identical to code written directly in Rust. It leverages rustc’s borrow checker, ensuring safety without extra layers.

Developers can compile with familiar commands: `cargo install --path .` to install, `rlisp compile file.lisp` to produce Rust, `rlisp build file.lisp` to compile, and `rlisp run file.lisp` to execute end‑to‑end. The syntax map mirrors Rust constructs—structs, enums, pattern matching, traits, and macros—so there is no semantic gap between the two layers. Resulting code benefits from existing IDE support.

Macros in rlisp are simple functions that transform s‑expressions at compile time, eliminating the need for Rust’s proc_macro scaffolding. Because the output is plain Rust, developers retain full access to the ecosystem and can drop raw Rust snippets with the `rust` form. The project ships under an MIT license, making it free for any use. It also encourages language experiments while staying production ready.