Move.toml

每个 Move 包都包括一个清单文件 Move.toml--它位于包的根目录。清单本身包含了许多部分,其中最主要的是:

  • [package] - 包括包相关的元数据,例如名字, 作者等
  • [dependencies] - 声明项目的依赖
  • [addresses] - 地址别名(例如 @me0x0 的别名)
English Version

Every Move package has a package manifest in the form of a Move.toml file - it is placed in the root of the package. The manifest itself contains a number of sections, primary of which are:

  • [package] - includes package metadata such as name and author
  • [dependencies] - specifies dependencies of the project
  • [addresses] - address aliases (eg @me will be treated as a 0x0 address)
[package] 
name = "sui-by-example"
version = "0.1.0"

[dependencies] 
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "main" }

[addresses]  
examples = "0x0"