[package] name = "ic-canister-kit" version = "1.0.15" edition = "2021" license = "Apache-2.0" readme = "README.md" include = ["src", "Cargo.toml", "LICENSE", "README.md"] description = "An ic canister package" authors = ["Anubis"] repository = "https://github.com/lazyanubis/ic-canister-kit" # [lib] # path = "src/lib.rs" # crate-type = ["cdylib"] [profile.release] lto = true # 通过对整个程序进行分析,并以增加链接时间为代价,LTO 可以生成更加优化的代码。 # false: 只会对代码生成单元中的本地包进行 thin LTO 优化,若代码生成单元数为 1 或者 opt-level 为 0,则不会进行任何 LTO 优化 # true 或 fat:对依赖图中的所有包进行 fat LTO 优化 # thin:对依赖图的所有包进行 thin LTO,相比 fat 来说,它仅牺牲了一点性能,但是换来了链接时间的可观减少 # off: 禁用 LTO opt-level = 3 # 优化级别 # 0: 无优化 # 1: 基本优化 # 2: 一些优化 # 3: 全部优化 # "s": 优化输出的二进制文件的大小 # "z": 优化二进制文件大小,但也会关闭循环向量化 codegen-units = 1 # 指定一个包会被分隔为多少个代码生成单元。更多的代码生成单元会提升代码的并行编译速度,但是可能会降低运行速度。 [features] default = [ "common", # "times", # "identity", # "canister", # "number", # "token", # "http", # "ecdsa", # "bitcoin", # "functions", # "canister-did", ] common = ["candid", "serde"] # 通用工具 times = ["ic-cdk"] # 时间相关 identity = ["candid", "ic-cdk", "sha2", "crc32fast", "hex"] # 身份相关 canister = ["identity", "serde"] # 罐子相关 number = ["canister", "base32"] # 数字相关 token = ["canister", "ic-ledger-types"] # 代币标准 http = ["canister", "serde", "serde_json"] # http 相关 ecdsa = ["canister"] # ecdsa 相关 bitcoin = ["canister"] # bitcoin 相关 functions = ["times", "ic-cdk-timers", "ciborium"] # functions 相关 call-once = ["common"] # 调用一次 schedule = ["functions", "times"] # 定时任务 stable = ["functions", "ic-stable-structures"] # 稳定内存 # candid 类型 canister-did = ["serde"] # # NFT相关 # nft = ["identity"] # NFT # nft_ext = ["nft"] # NFT EXT 标准 # nft_ticket = ["nft"] # NFT 是否具有门票功能 # nft_limit = ["nft"] # NFT 是否限制指定时间的功能 # nft_traits = ["nft"] # NFT 的属性记录 all = ["default"] [dependencies] candid = { version = "0.10.10", optional = true } ic-cdk = { version = "0.16", optional = true, features = ["transform-closure"] } ic-ledger-types = { version = "0.13", optional = true } # token 类型 ic-cdk-timers = { version = "0.10", optional = true } # 定时器 ic-stable-structures = { version = "0.6", optional = true } # 持久化内存 sha2 = { version = "0.10", optional = true } # hash crc32fast = { version = "1.4", optional = true } # 循环校验 hex = { version = "0.4", optional = true } # 16进制 base32 = { version = "0.5", optional = true } # base32 加密解密 serde = { version = "1.0", optional = true, features = ["derive"] } # 序列化/反序列化框架 serde_json = { version = "1", optional = true } # json ciborium = { version = "0.2", optional = true } # 序列化/反序列化