uni-core
The core interpreter library for the Uni programming language - a homoiconic stack-based language that unifies code and data.
Features
- Homoiconic - Code and data have identical representation
- Stack-based - All operations work with a central computation stack
- Tail-call optimized - Continuation-based evaluator enables infinite recursion
- Multiple numeric types - Integers, rationals, floats, and complex numbers
- no_std compatible - Works on embedded systems without the Rust standard library
Quick Start
Add to your Cargo.toml:
[]
= "0.0.10"
Basic usage:
use ;
Example: Calculator
use ;
let mut interp = new;
// Define a square function
execute_string.unwrap;
// Use it
execute_string.unwrap;
println!; // Output: 25
Optional Features
std- Standard library support (default: disabled)advanced_math- Trigonometric functions, exp/log, roundingcomplex_numbers- Complex number and Gaussian integer supportdatetime- Date/time operations (requiresstd)hardware-microbit- micro:bit v2 hardware primitiveshardware-pico- Raspberry Pi Pico W hardware primitives
Documentation
For complete documentation, examples, and the command-line REPL, see the main repository:
GitHub: https://github.com/edadma/uni
License
Dual-licensed under MIT OR Unlicense.