cat projects/libraries/lapis.html SOL.VIN JOURNAL v1.47-prod [ MFET2 ]

PROJECT // Lapis // Libraries

Lapis

2026-09-06

Modern, idiomatic Godot Engine 4.8+ bindings for Crystal via GDExtension C-API.

Lapis provides type-safe, high-performance bindings between Crystal and Godot Engine 4.8+ via Godot's modern GDExtension C-API.

Key architectural innovations:

  • Dead-Pointer Safety Guarantee: Prevents segmentation faults when Godot nodes are freed by GDScript or engine internals (queue_free()). Tracks engine 64-bit monotonic ObjectDB instance IDs and verifies liveness before dispatch with #check_alive!, transforming fatal memory violations into catchable Godot::DisposedObjectError exceptions.
  • In-Editor radare2 Debugger: Built-in Crystal debugger docked directly into the Godot Editor debugger panel powered by cradare2. Supports gutter breakpoint synchronization, call stack frames, CPU register inspection, and native pseudo-C decompilation (pdc) without external dependencies.
  • Multiplayer Multi-Session Debugging: Features lockstep break mode across peer sessions to prevent ENet/WebSocket heartbeat timeouts while debugging multiplayer instances.
  • Quantitative Zero Memory Leaks: Verified via Godot's Performance singleton monitors (OBJECT_COUNT, MEMORY_STATIC) and Crystal's GC.collect.
SKILLS USED:
Crystal Godot 4 Reverse Engineering radare2 C++