Back to browse
GitHub Repository

SPACYDO is a stack-based virtual machine with image-based persistence. The core abstraction is a TASK: a persistent entity carrying its own executable bytecode alongside its state. Tasks can observe and modify fields of other tasks and their own.

14 starsRust

Logic gates as persistent stateful tasks – a BCD decoder built on a VM

by tracyspacy·Mar 2, 2026·2 points·0 comments

AI Analysis

●●SolidWizardryBig BrainNiche Gem

Logic gates as stateful bytecode tasks—elegant model, but narrow use case.

Strengths
  • Genuine architectural insight: decoupling gate logic from central control makes programmability
  • Demonstrates power with real example (BCD decoder from Petzold), not just theory
  • Memory slicing and NaN-boxing shows production-quality thinking for embedded VM
Weaknesses
  • Unclear practical application beyond pedagogical or highly specialized use cases
  • Minimal documentation on why task-based gates outperform traditional simulation
Target Audience

Language designers, VM researchers, educators teaching low-level computing concepts

Similar To

wasmtime · TinyVM · Educational VM projects

Post Description

I'm building a tiny embeddable VM in Rust, where the core primitive is a Task with its own state and executable bytecode instructions.

Recently I added new example: Implementation of Binary Coded Decimal decoder from Petzold's "Code" book — every logic gate (bits switch, inverters, AND gates) is a task carrying its own instructions.

It works simple : cargo run 1001 -> 9 and as output it will show AND gate with inputs and output

bcd-decoder: https://github.com/tracyspacy/spacydo/tree/main/examples/bcd-decoder

Similar Projects