Skip to content

Instantly share code, notes, and snippets.

@Pavel-Durov
Created September 28, 2023 11:27
Show Gist options
  • Save Pavel-Durov/44dd21c246cb199ecb35a2cf31aa816f to your computer and use it in GitHub Desktop.
Save Pavel-Durov/44dd21c246cb199ecb35a2cf31aa816f to your computer and use it in GitHub Desktop.
Writing an Interpreter in Rust: Bytecode and Stack-based VM - instruction.rs
#[derive(Debug, PartialEq, Clone)]
pub enum Op {
Add, // Addition operation
Mull, // Multiplication operation
Push { value: u64 }, // Load numeric value onto stack
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment