2 releases
| 0.3.1 | Nov 3, 2025 |
|---|---|
| 0.3.0 | Nov 3, 2025 |
#266 in Development tools
48KB
1K
SLoC
BRVM - Brainrot v3 Virtual Machine
A compiler and virtual machine for the Brainrot v3 programming language, written in Rust.
Installation
cargo install brvm
Or install from source:
git clone https://github.com/yourusername/brvm.git
cd brvm
cargo build --release
Usage
Compiling Brainrot code
brvm compile input.brainrot -o output.brbc
If no output is specified, it defaults to input.brbc in the same directory.
Running bytecode
brvm exec output.brbc
Language Features (v3)
Braincells
Seven global variables: aura, peak, goon, mog, npc, sigma, gyatt
Statements
FANUMTAX <cell> FR <expr>- Assign a value to a braincellSAY <expr>- Print a value with newlineONGOD <expr> ... DEADASS- If statementONGOD <expr> ... NO CAP ... DEADASS- If/else statementSKIBIDI <expr> ... RIZZUP- While loop
Expressions
- Numbers (f64):
42,3.14 - Strings:
"hello","wsg WORLD!" - Variables: braincell names
- Binary operators:
💀- Addition / String concatenation😭- Subtraction😏- Multiplication🚡- Division
- Function calls:
TOUCHY()- Read input from stdinTOUCHY("prompt: ")- Print prompt and read input
Examples
Hello World
LOCK IN
SAY "wsg WORLD!"
ITS OVER
If/Else
LOCK IN
FANUMTAX sigma FR 0
ONGOD sigma
SAY "nonzero"
NO CAP
SAY "zero"
DEADASS
ITS OVER
While Loop
LOCK IN
FANUMTAX gyatt FR 3
SKIBIDI gyatt
SAY gyatt
FANUMTAX gyatt FR gyatt 😭 1
RIZZUP
ITS OVER
Output: 3\n2\n1
Interactive Input
LOCK IN
FANUMTAX aura FR TOUCHY("name: ")
ONGOD aura
SAY "hi " 💀 aura
NO CAP
SAY "no name provided"
DEADASS
ITS OVER
Truthiness
Number(0.0)→ falseString("")→ false- Everything else → true
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Dependencies
~0.9–1.4MB
~26K SLoC