.CR File Extension
Crystal Source Code
|Developer||Manas Technology Solutions|
3.0 | 7 Votes
What is a CR file?
A CR file is a source code file written in the Crystal programming language. It contains code that is meant to be compiled using the Crystal compiler. CR files can be opened and edited in any source code editor.
Crystal is a general object-oriented programming language that is based on Ruby. Unlike Ruby, however, Crystal is a compiled language. This means the language's source code files must be compiled before the code they contain can be executed.
Developers typically save Crystal source code in plain text files that use the .cr file extension. Saving Crystal source code files with the .cr extension allows source code editors that recognize the Crystal programming language to highlight the language's syntax correctly.
How to open a CR file
You can open and edit a CR file in any text or source code editor, such as GitHub Atom (cross-platform) or Microsoft Visual Studio Code (cross-platform). Most source code editors will allow you to install an extension that highlights Crystal syntax, making CR files easier to edit.
If you want to quickly compile and run the code a CR file contains, you can do so using the Online Playgrounds available on the language's GitHub page (linked below).