Introduction

The Rust Logo

The landscape of software development is both vast and intricate, dotted with countless tools and frameworks that rise as answers to the ever-present challenges faced by developers. Yet, amidst this vastness, finding a tool that truly resonates with one's philosophies can be like searching for a needle in a haystack. Such was the experience that led to the creation of surreal_orm.

After delving into over ten ORM solutions in Rust alone and journeying through more than twenty across languages such as TypeScript, Python, Java, Ruby, Elixir, and more, it became starkly evident: while many tools cater to the basic needs, very few strike the harmonious chord of simplicity, power, and expressiveness. This realization wasn't just a mere observation—it was the catalyst that inspired surreal_orm.

This book is not just an introduction to an ORM library; it's a narrative of a journey, a testament to a set of deeply-held philosophies, and an exploration of groundbreaking innovations:

  1. Expressive Yet Intuitive API: Traditional ORMs often make complex queries convoluted and unreadable. surreal_orm challenges this norm. At the heart of surreal_orm lies an unwavering commitment to clarity. The belief is straightforward: if a query can be articulated in raw string format, it should be just as elegantly expressible within the ORM. This ensures that even as queries grow intricate, they remain legible, empowering developers to write intuitive code without sacrificing capability.

  2. Compile-Time Excellence: Harnessing the full might of Rust's compile-time error checking, surreal_orm emphasizes robustness from the onset. From model declarations to query constructions, the goal is to catch potential pitfalls even before the code springs to life. And in scenarios where compile-time checks aren't feasible, surreal_orm employs meticulous runtime validations, standing as a testament to its commitment to reliability and safety.

  3. Pioneering Features: surreal_orm introduces pioneering ideas that set it apart. From innovative macros such as block!, transaction, object!, object_partial!, and cond!, to compile-time validations of graph structures, and advanced features like deep graph access and auto-parametrized mathematical expressions—these are just a glimpse of the groundbreaking capabilities you'll encounter.

  4. Full Specification Support: Beyond its intuitive design and innovative features, surreal_orm stands tall with its comprehensive support for the full specification. It's not just another ORM or query builder; it's a beacon of compliance and expressiveness in the ORM landscape.

As you delve deeper into these pages, you'll journey beyond the mechanics, delving into the essence of surreal_orm—understanding its origins, the problems it seeks to solve, and the philosophies that molded its creation. It's a tale of refusing to settle, of reimagining boundaries, and of sculpting a solution when none seemed just right.

Each chapter, carefully crafted by the very creator of surreal_orm, promises a deep dive into its intricacies, philosophies, and innovations. So, whether you're a seasoned Rust developer, an ORM enthusiast, or a curious soul eager to explore the intersections of innovation and software development, this book promises a voyage into the heart of data management with a fresh perspective in Rust—a realm where convention meets innovation, culminating in the creation of something truly surreal.

-- © Oyelowo Oyedayo, 2023.