1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-24 11:55:24 +02:00

nim: add check example (#9308)

This commit is contained in:
Jake Leahy 2022-10-26 21:00:57 +11:00 committed by GitHub
parent f500bf3524
commit e03ec4e499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,24 +2,28 @@
> The Nim compiler.
> Processes, compiles and links Nim language source files.
> More information: <https://nim-lang.org>.
> More information: <https://nim-lang.org/docs/nimc.html>.
- Compile a source file:
`nim compile {{file.nim}}`
`nim compile {{path/to/file.nim}}`
- Compile and run a source file:
`nim compile -r {{file.nim}}`
`nim compile -r {{path/to/file.nim}}`
- Compile a source file with release optimizations enabled:
`nim compile -d:release {{file.nim}}`
`nim compile -d:release {{path/to/file.nim}}`
- Build a release binary optimized for low file size:
`nim compile -d:release --opt:size {{file.nim}}`
`nim compile -d:release --opt:size {{path/to/file.nim}}`
- Generate HTML documentation for a module (output will be placed in the current directory):
`nim doc {{file.nim}}`
`nim doc {{path/to/file.nim}}`
- Check a file for syntax and semantics:
`nim check {{path/to/file.nim}}`