1.3 Fuel工具链 (The Fuel Toolchain)
Last updated
Last updated
The Fuel toolchain consists of several components.
Fuel 工具链由几个组件组成。
forc
)The "Fuel Orchestrator" is our equivalent of Rust's . It is the primary entry point for creating, building, testing, and deploying Sway projects.
“Fuel Orchestrator” 相当于 Rust 的.它是创建、构建、测试和部署 Sway 项目的主要入口点。
forc-lsp
)-Sway Language Server (forc-lsp
)The Sway Language Server forc-lsp
is provided to expose features to IDEs. .
提供 Sway 语言服务器forc-lsp
以向 IDE 公开功能。您可查看 。
Currently, only . Vim support is forthcoming, though .
目前,仅。 Vim 支持即将推出,不过目前也 。
Note: There is no need to manually run
forc-lsp
(the plugin will automatically start it), however bothforc
andforc-lsp
must be in your$PATH
. To check ifforc
is in your$PATH
, typeforc --help
in your terminal.注意:无需手动运行
forc-lsp
(插件会自动启动),但是forc
和forc-lsp
都必须在您的$PATH
中。要检查forc
是否在您的$PATH
中,请在终端中键入forc --help
。
forc-fmt
) - Sway Formatter (forc-fmt
)A canonical formatter is provided with forc-fmt
. . It can be run manually with
forc-fmt
提供了规范的格式化程序。您可查看 。它可以用以下命令手动运行
fuel-core
)The will automatically format Sway files with forc-fmt
on save, though you might have to explicitly set the Sway plugin as the default formatter, like this:
将在保存时,自动使用 forc-fmt
格式化 Sway 文件,尽管您可能必须明确用以下方式将 Sway 插件设置为默认的格式化程序:
An implementation of the Fuel protocol, , is provided together with the Sway toolchain to form the Fuel toolchain. will automatically start and stop an instance of the node during tests, so there is no need to manually run a node unless using Forc directly without the SDK.
Fuel 协议的实现 与 Sway 工具链 一起提,进而形成 Fuel 工具链。 会在测试期间自动启动和停止节点实例,因此无需手动运行节点,除非在没有 SDK 的情况下直接使用 Forc .