A lightweight, Erlang-inspired virtual machine for concurrent, fault-tolerant applications in Crystal.
This project combines a clean stack-based bytecode interpreter with actor-model concurrency, lightweight processes, message passing, supervision trees, and built-in fault tolerance — all implemented in pure Crystal.
Inspired by Erlang's BEAM, but designed to be simple, hackable, and embeddable.
- Stack-based VM — Predictable execution with a growing instruction set
- Actor-model concurrency — Thousands of lightweight processes, isolated mailboxes
- Fault tolerance — Linking, monitoring, supervision trees (one-for-one, one-for-all)
- First-class data — Maps, arrays, strings, atoms with native operations
- Built-in primitives — IO, process operations, yield/scheduling hooks
- Pure Crystal — No external dependencies beyond stdlib (easy to embed/extend)
Add AbstractMachine to your shard.yml:
dependencies:
abstract_machine:
github: konjac-lang/abstract_machineThen run:
shards install- Want to experiment with actor-model semantics without Erlang/OTP?
- Building a domain-specific language or embedded runtime in Crystal?
- Curious how BEAM-like supervision can work in a stack VM?
This project is small (~few thousand LOC), readable, and meant for learning/hacking.
- Fork it (https://github.com/konjac-lang/abstract_machine/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
- Giorgi Kavrelishvili - creator and maintainer