| Crates.io | omg_runtime |
| lib.rs | omg_runtime |
| version | 0.1.4 |
| created_at | 2025-08-23 19:03:48.343471+00 |
| updated_at | 2025-08-23 19:19:08.099984+00 |
| description | The OMG language runtime and virtual machine, providing bytecode execution, REPL, and built-in functions. |
| homepage | https://github.com/sentrychris/omglang |
| repository | https://github.com/sentrychris/omglang |
| max_upload_size | |
| id | 1807796 |
| size | 196,795 |
The OMG Runtime is the execution engine for the OMG programming language — a personal, educational language project designed to explore the full stack of compiler and interpreter implementation.
This crate provides:
setup_except, raise, pop_block)Supports all major categories of instructions:
None+ - * / % & | ^ << >> ~== != < <= > >= and orassert, raise, setup_exceptemit to stdoutOut-of-the-box helpers for everyday use:
chr, ascii, hex, binarylengthfreeze (immutable dicts)panic, raiseread_file, file_existsfile_open, file_read, file_write, file_closecall_builtinInteractive interpreter for OMG source code:
>>> and supports multiline input (...)exit / quitTwo-layer error handling:
ErrorKind – compact categories (for bytecode raise ops)RuntimeError – detailed structured errors (with Display messages)Examples:
AssertionErrorTypeError("expected integer")IndexError("out of bounds")VmInvariant("stack underflow");;;omg
proc greeting(name) {
return "Hello " + name
}
emit greeting("World")
alloc xs := [1, 2, 3]
emit "length(xs) = " + length(xs)
# Assertions and loops
facts 2 + 2 == 4
alloc i := 0
loop i < 3 {
emit "i = " + i
i := i + 1
}
Compile to bytecode (.omgb) or run directly through the embedded interpreter.
$ cargo run
OMG Language Interpreter - REPL
Type `exit` or `quit` to leave.
>>> alloc x := 5
>>> emit x * 2
10
Add to your project:
[dependencies]
omg_runtime = "0.1.2"
Or install the runtime directly:
cargo install omg_runtime
Licensed under the MIT License.
OMG is an educational project. The runtime is stable enough to run example scripts and bytecode, but the language is not serious. Expect breaking changes as new features are added.