2.2.1 Fuel工具链 (The Fuel Toolchain)
The full stack of tools designed and built by Fuel Labs for enabling/assisting the Fuel application development experience.
Fuel Labs 设计和构建的全套工具,用于支持/协助 Fuel 应用程序开发体验。
Tooling Overview: 工具概述:
fuel-core
: The Fuel VM node client.fuel-core
:Fuel VM 节点客户端。forc
: The Fuel Orchestrator. Includes Sway compiler, packaging and plugin support.forc
:Fuel协调器。包括 Sway 编译器、打包和插件支持。
Forc plugins by Fuel Labs: Fuel Labs 的 Forc 插件:
forc-fmt
: The Sway code formatter.forc-fmt
:Sway 代码格式化工具。forc-lsp
: The Sway Language Server Protocol implementation.forc-lsp
:Sway 语言服务器协议实现。forc-explore
: Runs the Fuel block explorer.forc-explore
:运行Fuel块浏览器。forc-client
: For deploying and running Sway apps via CLI.forc-client
:用于通过 CLI 部署和运行 Sway 应用。forc-wallet
: For initializing a wallet, adding accounts and signing transactions.forc-wallet
:用于初始化钱包、添加账户和签署交易。fuelup
: The Fuel toolchain manager - an easy approach to retrieving all of the above.fuelup
:Fuel 工具链管理器 - 一种检索上述所有内容的简单方法。
For more specific documentation on the toolchain, check out the Sway docs here.
有关工具链的更多具体文档,请在此处 查看 Sway 文档。
在Fuel上构建 (Building on Fuel)
Developers can get everything they need to start creating Sway applications for the Fuel VM with a single toolchain, blessed by the same teams that create the FuelVM and Sway language.
开发人员可以获得开始使用单个工具链为 Fuel VM来创建 Sway 应用所需的一切,这得益于创建 FuelVM 和 Sway 语言有着相同团队。
One common issue developers face when working within the Ethereum ecosystem is how to choose a set of tools to get started. Historically, Ethereum's founders have been particularly focused on the low-level details of the protocol, the EVM and to a lesser extent Solidity, leaving the job of creating accessible, high-level tooling to the community. As a result, many disparate projects have appeared from different 3rd parties that aim to provide these high-level solutions such as truffle, dapptools, hard hat, foundry and many more. It can be difficult for new Ethereum developers to navigate this space and to feel comfortable knowing they're making the right choice in selecting one of these toolchains.
开发人员在以太坊生态系统中工作时面临的一个常见问题是如何选择一组工具开始(构建)。从历史上看,以太坊的创始人一直特别关注协议的底层细节、EVM ,但对Solidity相对关心较少,进而把创建可访问的高级工具的工作留给了社区。因此,来自不同第 3 方的许多项目出现了,它们提供这些高级解决方案,例如 truffle、dapptools、hard hat、foundry 等等。新的以太坊开发人员可能很难驾驭这个空间,并且很难知道如何从这些工具链中正确选择。
In contrast, Fuel Labs take a curated, "batteries-included"-yet-modular approach to providing tooling. We aim to provide a comprehensive, standardized, canonical set of tools that cover not only the lower levels of the stack (like protocol and VM implementations) but the higher level too (such as package management, editor support, common-use plugins and much more). We aim to do so in a manner that is open, transparent and welcoming of external contributions.
相比之下,Fuel Labs 采用精心策划的“内置电池”但模块化的方法来提供工具。我们的目标是提供一套全面、标准化、规范的工具集,不仅涵盖堆栈的较低级别(如协议和 VM 实现),还涵盖较高级别(如包管理、编辑器支持、常用插件等)更多的)。我们旨在以公开、透明和欢迎外部贡献的方式这样做。
To clarify, the goal is not at all to discourage 3rd parties from extending the fuel ecosystem. Rather, we aim to make the official tool-chain so good as to inspire contributions upstream and to collaborate under one unified developer ecosystem. For those cases where our tooling falls short and additions or extensions are required, we provide an extensible plugin system through forc
, enabling community creativity in a manner that is easily-shareable and familiar to fellow Fuel devs.
澄清一下,此处的目标根本不是阻止第三方扩展Fuel生态系统。相反,我们的目标是使官方工具链出色到不但可以激发上游贡献,还可以在一个统一的开发生态系统下进行协作。对于我们的工具不足并且需要添加或扩展的情况,我们通过forc
提供了一个可扩展的插件系统,以一种易于共享且为 Fuel 开发人员所熟悉的方式实现社区创造力。
The Sway VS Code plugin is a great example of our vision for a unified developer experience. The plugin interacts with the Sway language server, a forc plugin that communicates directly with the Sway compiler and shares much of its code-base. The plugin also allows for spinning up a Fuel node, displaying its status in real-time and (in the near future) interact with your smart contracts via the TypeScript SDK. A complete solution from entirely within the plugin, from one team with a shared vision.
Sway VS Code 插件是我们针对统一开发人员体验愿景的一个很好的例子。该插件与 Sway 语言服务器交互,这是一个 forc 插件,直接与 Sway 编译器通信并共享其大部分代码库。该插件还允许启动 Fuel 节点,实时显示其状态,并(在不久的将来)通过 TypeScript SDK 与您的智能合约进行交互。一个完全在插件内的完整解决方案,来自一个具有共同愿景的团队。
You can start experimenting with the Fuel toolchain by following the Fuelup Quickstart Guide.
您可以按照 Fuelup 快速入门指南 开始试验 Fuel 工具链。
Last updated