W3cubDocs

/Crystal

From sources

If you want to contribute then you might want to install Crystal from sources. But Crystal is written in Crystal itself! So you first need to use one of the previous described methods to have a running compiler.

You will also need LLVM 3.5 or 3.6 present in the path. If you are using Mac and the Homebrew formula, this will be automatically configured for you if you install Crystal adding --with-llvm flag.

  1. Make sure to install all the required libraries. You might also want to read the contributing guide.

  2. Clone the repository:

git clone https://github.com/crystal-lang/crystal.git
  1. Run make to build your own version of the compiler
  2. Run make spec to ensure all specs pass, and you've installed everything correctly.
  3. Use bin/crystal to run your crystal files

If you would like more information about the new bin/crystal, check out the using the compiler documentation.

Note: The actual binary is built in to .build/crystal, but the bin/crystal wrapper script is what you should use to run crystal.

To the extent possible under law, the persons who contributed to this workhave waived
all copyright and related or neighboring rights to this workby associating CC0 with it.
https://crystal-lang.org/docs/installation/from_source_repository.html