Preface
The Crystal programming language is designed with both humans and computers in mind. It provides highly readable syntax that compiles to efficient code.
In this book, we are going to explore all that Crystal has to offer. We will start by introducing the language, including its core syntactical and semantic features. Next, we will dive into how to create a new Crystal project by walking through how to create a CLI-based application, which will involve making use of more advanced features such as IOs, concurrency, and C bindings.
In the third part of this book, we will learn how to make use of external libraries in the form of Crystal Shards. We will then make use of this knowledge by walking through the process of creating a web application using the Athena Framework.
The fourth part of the book covers one of Crystal’s most powerful features: metaprogramming. Here, we will learn how to leverage macros, annotations, and compile-time-type introspection. We will then learn how these can be combined to implement some pretty powerful features.
We will wrap things up by introducing some of Crystal’s supporting features, such as how to document, test, and deploy Crystal programs, as well as how to automate these processes by introducing CI into your workflow.
Important Note:
This book is intended for Crystal version 1.4.x. Future versions should also work but will not cover newly added features.