Files
tldr/pages.zh/common/carp.md

28 lines
544 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Carp
> Carp 的 REPL 和构建工具。
> 更多信息:<https://carp-lang.github.io/carp-docs/Manual.html>。
- 启动 REPL交互式 shell
`carp`
- 启动带自定义提示符的 REPL
`carp --prompt "{{> }}"`
- 构建一个 `carp` 文件:
`carp -b {{path/to/file.carp}}`
- 构建并运行一个文件:
`carp -x {{path/to/file.carp}}`
- 在启用优化的情况下构建一个文件:
`carp -b --optimize {{path/to/file.carp}}`
- 将一个文件转译为 C 代码:
`carp --generate-only {{path/to/file.carp}}`