snippetbashTip
crystal — Manage Crystal source code. More information: <https://crystal-lang.org/reference/using_the_compiler
Viewed 0 times
commandcrystalsourceclimanagecodemore
Problem
How to use the
crystal command: Manage Crystal source code. More information: <https://crystal-lang.org/reference/using_the_compiler>.Solution
crystal — Manage Crystal source code. More information: <https://crystal-lang.org/reference/using_the_compiler>.Run a Crystal file:
crystal {{path/to/file.cr}}Compile a file and all dependencies to a single executable:
crystal build {{path/to/file.cr}}Read Crystal source code from the command-line or
stdin, and execute it:crystal eval '{{code}}'Generate API documentation from inline docstrings in Crystal files:
crystal docsCompile and run a Crystal specification suite:
crystal specStart a local interactive server for testing the language:
crystal playCreate a project directory for a Crystal application:
crystal init app {{application_name}}Display help:
crystal helpCode Snippets
Run a Crystal file
crystal {{path/to/file.cr}}Compile a file and all dependencies to a single executable
crystal build {{path/to/file.cr}}Read Crystal source code from the command-line or `stdin`, and execute it
crystal eval '{{code}}'Generate API documentation from inline docstrings in Crystal files
crystal docsCompile and run a Crystal specification suite
crystal specContext
tldr-pages: common/crystal
Revisions (0)
No revisions yet.