Crystal

Crystal is a statically typed, compiled programming language with Ruby inspired syntax and global type interference.


Installing Crystal

To install Crystal, install crystalAUR. To install the latest development version install crystal-gitAUR.

You can also install a prebuilt package by adding the following to your /etc/pacman.conf:

 [home_MrZYX_crystal_crystal]
 SigLevel = Never
 Server = http://download.opensuse.org/repositories/home:/MrZYX:/crystal/crystal/$arch

Then refresh your pacman database and install the crystal package.

Usage

To compile and run a Crystal program:

 $ crystal hello_world.cr

To compile a Crystal program to a binary:

 $ crystal build hello_world.cr

To compile an optimized binary:

 $ crystal build --release hello_world.cr

For more options see:

 $ crystal help

See also