14 个重大版本发布

0.31.0 2023 年 7 月 5 日
0.29.1 2023 年 6 月 19 日
0.19.0 2023 年 3 月 17 日
0.11.0 2022 年 12 月 22 日

#135 in 仿真器

Download history 4/week @ 2024-03-07 2/week @ 2024-03-14 11/week @ 2024-03-28 4/week @ 2024-04-04 144/week @ 2024-04-11 5/week @ 2024-04-18 2/week @ 2024-04-25

339 次每月下载
tasm-lib 中使用

Apache-2.0GPL-2.0 许可证

72KB
2K SLoC

triton-opcodes

Triton VM (GitHub, Crates.io) 是一个带有代数执行表 (AET) 和算术中间表示 (AIR) 的虚拟机,可用于与 STARK 证明系统结合使用。

triton-opcodes 包提供 Instruction 类型和一个类似于汇编的解析器。

// Swap the top two stack elements so they're sorted.
//
// The larger element is at the top.
//
// Before: _ a b
// After: _ min(a, b) max(a, b)
minmax:
    dup 1        // _ a b a
    dup 1        // _ a b a b
    lt           // _ a b (b < a)
    skiz swap 1  // _ min(a, b) max(a, b)
    return

特性

  • lt 之类的伪指令通过简单替换实现。
  • 标签跳转,其中标签看起来像 <name>:,跳转到它们的格式看起来像 call <name>
  • 使用形式为 // ... 的内联注释。

依赖关系

~11–23MB
~316K SLoC