# maru | Attila Lendvai | Knowledge Base | Instagit

Maru - a tiny self-hosting lisp dialect

GitHub Stars: 217

Repository: https://github.com/attila-lendvai/maru

---

## Articles

### [How the Maru Bootstrap Isolates Host and Target Environments: A Three-Stage Architecture](/attila-lendvai/maru/how-does-the-bootstrap-isolate-host-and-target-environments)

Learn how the Maru bootstrap isolates host and target environments using a three-stage architecture. Explore exclusive environment objects and global pointer rebinding to prevent host primitive leakage.

- Tags: architecture
- Published: 2026-02-25

### [Memory Layout of Maru Heap Objects: A Deep Dive into the GC Header Structure](/attila-lendvai/maru/what-is-the-memory-layout-of-maru-heap-objects)

Explore the Maru heap object memory layout. Understand the GC header structure and how it manages size, type, and GC state for efficient garbage collection.

- Tags: deep-dive
- Published: 2026-02-25

### [How Variables Are Resolved at Compile Time in Maru](/attila-lendvai/maru/how-are-variables-resolved-at-compile-time-in-maru)

Discover how Maru resolves variables at compile time by transforming identifiers into concrete objects with fixed stack indices for efficient memory access.

- Tags: internals
- Published: 2026-02-25

### [How Maru Compiles Standalone ELF Binaries: A Complete Technical Guide](/attila-lendvai/maru/how-does-maru-compile-standalone-elf-binaries)

Learn how Maru compiles standalone ELF binaries directly to disk, bypassing external toolchains like GCC and LD. Get a complete technical guide.

- Tags: deep-dive
- Published: 2026-02-25

### [What Is the Difference Between the libc and Linux Platforms in Maru?](/attila-lendvai/maru/what-is-the-difference-between-the-libc-and-linux-platforms)

Understand the core differences between Maru's libc and Linux platforms. Learn how libc uses host C library while Linux uses raw kernel syscalls for system operations.

- Tags: deep-dive
- Published: 2026-02-25

### [How Maru’s Bootstrap Process Handles Type ID Changes](/attila-lendvai/maru/how-does-the-bootstrap-process-handle-type-id-changes)

Discover how Maru's bootstrap process ensures stability by dynamically mapping type IDs between host and slave VMs. Learn how Maru handles type ID changes.

- Tags: internals
- Published: 2026-02-25

### [Statistical Profiler Implementation in Maru: Platform-Specific Deep Dive](/attila-lendvai/maru/what-is-the-statistical-profiler-implementation)

Explore Maru's statistical profiler implementation. Discover how it uses SIGVTALRM to sample execution with Linux syscall or libc wrappers for diverse build environments.

- Tags: deep-dive
- Published: 2026-02-25

### [How the Maru Compiler Emits Literal Objects into the Read-Only Segment](/attila-lendvai/maru/how-does-the-compiler-emit-literal-objects-into-the-read-only-segment)

Discover how the Maru compiler emits literal objects into the read-only segment using emit-objectC-string, generating assembler directives and omitting heap header fields for efficient memory management.

- Tags: internals
- Published: 2026-02-25

### [What Is Level-Shifting in the Maru Compiler? A Deep Dive into Self-Hosting Compilation](/attila-lendvai/maru/what-is-level-shifting-in-the-maru-compiler)

Discover level-shifting in the Maru compiler. Learn how it transforms high-level Maru S-expressions into executable machine code, LLVM bitcode, or C for self-hosting compilation.

- Tags: deep-dive
- Published: 2026-02-25

### [How Maru Handles Closure Compilation: From Lambda to Runtime Object](/attila-lendvai/maru/how-does-maru-handle-closure-compilation)

Discover how Maru compiles closures. Learn how it creates runtime closure values with machine code labels and captured contexts for efficient indirect invocation.

- Tags: internals
- Published: 2026-02-25

### [Understanding the Structure of Maru's VM: Architecture and Execution Pipeline](/attila-lendvai/maru/what-is-the-structure-of-marus-vm-virtual-machine)

Explore Maru's VM architecture and execution pipeline. Understand its four layers and the expand-encode-eval process for efficient Lisp code execution.

- Tags: architecture
- Published: 2026-02-25

### [How the Maru LLVM Backend Emits Code: A Deep Dive into emit-llvm.l](/attila-lendvai/maru/how-does-the-llvm-backend-emit-code)

Discover how the Maru LLVM backend emits code by printing textual LLVM-IR directly from compilation buffers. Learn about its efficient three stage pipeline.

- Tags: deep-dive
- Published: 2026-02-25

### [What Are Selectors and How Does Dispatch Work in Maru?](/attila-lendvai/maru/what-are-selectors-and-how-does-dispatch-work-in-maru)

Understand Maru selectors and dispatch. Learn how Maru implements polymorphism using argument types method tables and method fallback for efficient code execution.

- Tags: deep-dive
- Published: 2026-02-25

### [How Does Maru's Garbage Collector Work? A Deep Dive into the Mark-and-Sweep Implementation](/attila-lendvai/maru/how-does-marus-garbage-collector-work)

Discover how Maru's garbage collector works. Learn about its precise mark-and-sweep implementation using a custom heap chunk list and header metadata for efficient memory management.

- Tags: deep-dive
- Published: 2026-02-25

### [Understanding the Role of boot.l in the Maru Bootstrap Process](/attila-lendvai/maru/what-is-the-role-of-boot-l-in-the-bootstrap-process)

Discover the role of boot.l in the Maru bootstrap process. It initializes the Maru VM environment, providing essential primitives and a module loader for self-hosting compilation.

- Tags: internals
- Published: 2026-02-25

### [How the Maru Compiler Handles the Expand and Encode Phases](/attila-lendvai/maru/how-does-the-compiler-handle-the-expand-and-encode-phases)

Explore how the Maru compiler handles expand and encode phases. Learn about macro expansion, special form normalization, and identifier resolution in source/evaluator/eval.l.

- Tags: internals
- Published: 2026-02-25

### [What Platforms Can Maru Run On? libc, Linux, and Bare‑Metal Support Explained](/attila-lendvai/maru/what-platforms-can-maru-run-on-libc-linux-bare-metal)

Discover Maru's platform support for libc, Linux, and bare-metal execution. Run Maru without a C runtime on minimal C libraries or directly on the Linux kernel.

- Tags: support
- Published: 2026-02-25

### [How the Maru Bootstrapping Process Works: A Multi-Stage Self-Hosting Guide](/attila-lendvai/maru/how-does-marus-bootstrapping-process-work-across-different-stages)

Discover how Maru's multi-stage bootstrapping process works. Learn its three-actor model for self-hosting and compiling your language.

- Tags: internals
- Published: 2026-02-25

