Fuel手册-更新中 (The Fuel Book)-updating
  • 0.Fuel手册 (The Fuel Book)
  • 1. 开发者快速上手 (Developer Quickstart)
    • 1.1构建智能合约 (Building A Smart Contract)
    • 1.2 构建前端 (Building a Frontend)
  • 2.准备开始 (Getting Started)
    • 2.1为什么是Fuel (Why Fuel)
    • 2.2Fuel是什么? (What is Fuel?)
      • 2.2.1 Fuel工具链 (The Fuel Toolchain)
    • 2.3 模块化运动 (Modular Movement)
      • 2.3.1 单片架构 (Monolithic Architecture)
      • 2.3.4 什么是模块化执行层 (What is a Modular Execution Layer)
    • 2.4 Fuel设置 (Fuel Configurations)
      • 2.4.1 作为汇总的Fuel (Fuel as a roll-up)
      • 2.4.2 作为L1的Fuel (Fuel as an L1)
      • 2.4.3 作为状态通道的Fuel (Fuel as a state channel)
      • 2.4.4 作为侧链的Fuel (Fuel as a sidechain)
  • 3. 技术 (Technology)
    • 3.1 并行交易执行(Parallel Transaction Execution)
    • 3.2欺诈证明 (Fraud Proofs)
  • 4. Fuel虚拟机 (The FuelVM)
    • 4.1合约和调用模型(Contract and Call Model)
    • 4.2内存模式 (Memory Mode)
    • 4.3多重原生资产(Multiple Native Assets)
    • 4.4FuelVM和EVM, 轻松搞明白(FuelVM vs. EVM, Explained)
  • 5.Sway语言 (Sway Language)
    • 5.1 Sway设计哲学 (Sway Design Philosophy)
    • 5.2 Sway的安全性 (Sway Safety)
  • 6.开发者看这里(For Developers)
    • 6.1Sway程序示例 (Sway Application Examples)
    • 6.2 网络 (Networks)
      • 6.2.1 `beta-3`测试网 (The `beta-3` testnet)
      • 6.2.2 `beta-2`测试网 (The `beta-2` testnet)
      • 6.2.3 `beta-1` 测试网 (beta-1 testnet)
    • 6.3 运行一个本地Fuel节点 (Running a local Fuel node)
    • 6.4 Sway语言 (Sway Language) 🌴
    • 6.5 Typescript SDK
    • 6.6 Rust SDK
    • 6.7 Fuel索引器 (Fuel Indexer)
    • 6.8 水龙头和区块浏览器 (Faucet and Block Explorer)
    • 6.9 Fuelup
    • 6.10 Fuel GraphQL API
  • 7. Fuel术语 (Fuel Glossary)
Powered by GitBook
On this page

5.Sway语言 (Sway Language)

Previous4.4FuelVM和EVM, 轻松搞明白(FuelVM vs. EVM, Explained)Next5.1 Sway设计哲学 (Sway Design Philosophy)

Last updated 2 years ago

Sway is a smart contract programming language that prioritizes safety and speed and brings modern programming language theory to the blockchain.

Sway是一种智能合约编程语言,以安全和速度为优先,将现代编程语言理论引入区块链。

Check out the Sway docs .

请在 查看 Sway 文档。

Rust + Solidity = Sway

Sway prioritizes compile-time analysis and safety, similar to Rust’s borrow checker and safety-first semantics. Additionally, it has the syntax of Rust. From Solidity, Sway took the notion of a smart-contract-paradigm language with built-in top-level contract storage and blockchain mechanisms for ergonomic and safe contract programming.

Sway 优先考虑编译时分析和安全,类似于 Rust 的借用检查器和安全优先语义。此外,它具有 Rust 的语法。从 Solidity 中,Sway 采用了一种智能合约范式语言的概念,该语言具有内置的顶级合约存储和区块链机制,用于符合人体工程学和安全的合约编程。

In addition to robust documentation, tooling, clear error messages, and more – Sway brings the notion of static auditing to smart contracts. The compiler will catch things that one would typically hire an auditing firm to catch. This is particularly unique. In addition, Sway is highly performant and has extensible optimization passes and a modular backend for targeting different blockchain architectures.

除了强大的文档、工具、清晰的错误消息等之外,Sway 还为智能合约带来了静态审计的概念。编译器将捕获通常会聘请审计公司捕获的内容。这是十分独特。此外,Sway 具有高性能并具有可扩展的优化通道和针对不同区块链架构的模块化后端。

Check out Sway examples .

请在 查看 Sway 示例。

here
此处
here
此处