This repo provides an official way to try the Crystal programming language on Windows.
- Scoop Package Manager
- Visual Studio or Visual Studio Build Tools with
Microsoft.VisualStudio.Workload.VCToolsandMicrosoft.VisualStudio.Component.VC.ATLcomponents.- If you already have an existing Visual Studio installation (2017 or later), open the installer and simply select these components under Desktop Development.
- Otherwise, you can install a smaller subset of Visual Studio with only the tools you need from this bucket (more on that later).
Run the following in commands in terminal to install the latest crystal release.
-
scoop install git -
scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal- If you don't already have the correct Visual Studio components discussed earlier, run
scoop install vs_2022_cpp_build_tools. The Visual Studio Installer UI will open to display progress. - If you see
ERROR Exit code was 3010!, this simply means you'll need to reboot for VS to complete the installation. Run the same command again then reboot.
- If you don't already have the correct Visual Studio components discussed earlier, run
-
scoop install crystal
Next, create a file called hello.cr with the editor of your choice and the following contents:
puts "Hello from Windows!"
Run crystal hello.cr and voila!
The majority of the language is available and functional on Windows. For more information about platform support, see the documentation.
