DEV Community

Anton Maminov
Anton Maminov

Posted on

Announcing Lustra: a Postgres ORM for Crystal

TL;DR: Lustra started as a fork of Clear at version 0.8, and it is not compatible with later Clear releases. Over time it evolved into an independent project. To keep it compatible with newer Crystal versions, I continued development, added missing features, improved existing ones, and expanded test coverage. Today Lustra stands as its own project.


When I started building shards.info, I had to make an important choice: which ORM to use with Crystal. Coming from a Ruby on Rails background, I was naturally looking for something similar to ActiveRecord — straightforward, feature-rich, and reliable. I reviewed several options available at the time: Jennifer, Crecto, Granite, and Clear. After evaluating them, I chose Clear. At the time, it was the most advanced ORM in the Crystal ecosystem. Even though it has been limited to Postgres support, I didn’t plan to use other databases, so this limitation was never a drawback for me.

Clear later introduced a new major version with substantial API and behavior changes. Some of those changes (and a few bugs at the time) broke previously working code in my project. My system was already running smoothly, and I wasn’t ready to trade stability for churn.

To keep my project alive - I forked it. That fork is now Lustra.


What is Lustra?

Lustra is an ORM built specifically for PostgreSQL in Crystal, maintained independently.
It aims to provide a stable, reliable, and Crystal-compatible ORM for Postgres database.


Why Lustra?

  • Proven capabilities: Associations, query builder, type safety - the same qualities that originally attracted me to Clear.
  • Stable API: I don’t plan to change the API in the future, so existing projects can rely on consistent behavior.
  • Independent evolution: I’ve ensured compatibility with new Crystal versions, added new features, and expanded test coverage.

The name

Why “Lustra”?
Because the word means “chandelier” in several languages. To me, a chandelier looks like a database schema: a structured network of connections. It also carries the idea of clarity and shine.


Personal reflection

Working on Lustra started as a practical need to keep my project running. Over time, it became an opportunity to explore Crystal and ORM internals more deeply. Lustra represents my preference for tools that are stable and predictable. Maintaining it has also shown me how consistent effort can turn a fork into an independent project.


What’s next?

Lustra will continue as a stable Postres ORM for Crystal developers.

If you’re looking for a dependable ORM for your Crystal projects, give Lustra a try.

👉 https://github.com/crystal-garage/lustra

Top comments (1)

Collapse
 
aarongibbs profile image
Aaron Gibbs

Thanks for the stable API, Postgres focus, and Crystal compatibility—so useful!