14 breaking releases

0.31.0 Jul 5, 2023
0.29.1 Jun 19, 2023
0.19.0 Mar 17, 2023
0.11.0 Dec 22, 2022

#1255 in Cryptography

Download history 20/week @ 2023-08-01 32/week @ 2023-08-08 26/week @ 2023-08-15 3/week @ 2023-08-22 17/week @ 2023-08-29 25/week @ 2023-09-05 8/week @ 2023-09-12 23/week @ 2023-09-19 11/week @ 2023-09-26 7/week @ 2023-10-03 5/week @ 2023-10-10 5/week @ 2023-10-17 9/week @ 2023-10-24 20/week @ 2023-10-31 7/week @ 2023-11-07 20/week @ 2023-11-14

57 downloads per month
Used in tasm-lib

Apache-2.0 and GPL-2.0 licenses

72KB
2K SLoC

triton-opcodes

Triton VM (GitHub, Crates.io) is a virtual machine that comes with Algebraic Execution Tables (AET) and Arithmetic Intermediate Representations (AIR) for use in combination with a STARK proof system.

The package triton-opcodes delivers the Instruction type and a parser from assembly like:

// 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

Features:

  • pseudo-instructions like lt by simple substitution.
  • labelled jumps where labels look like <name>: and jumping to them looks like call <name>.
  • inline comments in the form // ....

Dependencies

~10–20MB
~312K SLoC