2018-09-14 16:58:02 +01:00
|
|
|
# crystal
|
|
|
|
|
2024-02-14 20:25:13 +00:00
|
|
|
> Manage Crystal source code.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://crystal-lang.org/reference/using_the_compiler>.
|
2018-09-14 16:58:02 +01:00
|
|
|
|
2019-04-18 10:48:51 +01:00
|
|
|
- Run a Crystal file:
|
2018-09-14 16:58:02 +01:00
|
|
|
|
|
|
|
`crystal {{path/to/file.cr}}`
|
|
|
|
|
|
|
|
- Compile a file and all dependencies to a single executable:
|
|
|
|
|
|
|
|
`crystal build {{path/to/file.cr}}`
|
|
|
|
|
2023-10-08 12:28:50 +01:00
|
|
|
- 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 docs`
|
|
|
|
|
|
|
|
- Compile and run a Crystal specification suite:
|
|
|
|
|
|
|
|
`crystal spec`
|
|
|
|
|
2018-09-14 16:58:02 +01:00
|
|
|
- Start a local interactive server for testing the language:
|
|
|
|
|
|
|
|
`crystal play`
|
|
|
|
|
2019-04-18 10:48:51 +01:00
|
|
|
- Create a project directory for a Crystal application:
|
2018-09-14 16:58:02 +01:00
|
|
|
|
|
|
|
`crystal init app {{application_name}}`
|
|
|
|
|
|
|
|
- Display all help options:
|
|
|
|
|
|
|
|
`crystal help`
|