Latest release 1.11.2
18 January 2024 - More release notes
Syntax
Crystal’s syntax is heavily inspired by Ruby’s, so it feels natural to read and easy to write, and has the added benefit of a lower learning curve for experienced Ruby devs.
Type system
Crystal is statically type checked, so any type errors will be caught early by the compiler rather than fail on runtime. Moreover, and to keep the language clean, Crystal has built-in type inference, so most type annotations are unneeded.
Null reference checks
All types are non-nilable in Crystal, and nilable variables are represented as a union between the type and nil. As a consequence, the compiler will automatically check for null references in compile time, helping prevent the dreadful billion-dollar mistake.
Running the previous file:
Macros
Crystal’s answer to metaprogramming is a powerful macro system, which ranges from basic templating and AST inspection, to types inspection and running arbitrary external programs.
Concurrency Model
Crystal uses green threads, called fibers, to achieve concurrency. Fibers communicate with each other using channels, as in Go or Clojure, without having to turn to shared memory or locks.
C-bindings
Crystal has a dedicated syntax to easily call native libraries, eliminating the need to reimplement low-level tasks.
Dependencies
Crystal libraries are packed as Shards, and distributed via Git without needing a centralised repository. Built in commands allow dependencies to be easily specified through a YAML file and fetched from their respective repositories.
Crystal top sponsors
Meet allSome of our CI runs here
Our newsletter regularly shares highlights and insights on the Crystal language and community.
Articles from our blog
Release Notes
Crystal 1.11.2 is released! | 18 Jan 2024 | |
Crystal 1.11.1 is released! | 11 Jan 2024 | |
Crystal 1.11.0 is released! | 08 Jan 2024 | |
Crystal 1.10.1 is released! | 13 Oct 2023 | |
Crystal 1.10.0 is released! | 09 Oct 2023 | |
Crystal 1.9.2 is released! | 19 Jul 2023 | |
Crystal 1.9.1 is released! | 17 Jul 2023 | |
Crystal 1.9.0 is released! | 11 Jul 2023 | |
Crystal 1.8.2 is released! | 09 May 2023 | |
Crystal 1.8.1 is released! | 20 Apr 2023 |