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 仿真器
339 次每月下载
在 tasm-lib 中使用
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