https://github.com/hunter-hongg/miva-lang
Miva: Memory-safe, Verifiable, Predictable. A systems language that’s simpler than Rust, safer than Go, faster than Python. Building a safe, zero-cost systems language with explicit ownership and no GC. Compiles to C++.
https://github.com/hunter-hongg/miva-lang
compiler explicit memory-safe no-gc programming-language rust-inspired system-programming systems-programming
Last synced: 1 day ago
JSON representation
Miva: Memory-safe, Verifiable, Predictable. A systems language that’s simpler than Rust, safer than Go, faster than Python. Building a safe, zero-cost systems language with explicit ownership and no GC. Compiles to C++.
- Host: GitHub
- URL: https://github.com/hunter-hongg/miva-lang
- Owner: hunter-hongg
- License: mit
- Created: 2026-02-13T13:36:01.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-04-19T13:34:49.000Z (3 months ago)
- Last Synced: 2026-04-19T15:32:14.254Z (3 months ago)
- Topics: compiler, explicit, memory-safe, no-gc, programming-language, rust-inspired, system-programming, systems-programming
- Language: OCaml
- Homepage:
- Size: 4.98 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Miva Programming Language Compiler
The Miva compiler - a full-stack compiler that parses Miva source code and compiles it to native binaries via C++.
## Build
```bash
cargo build --release
```
## Usage
### Init project
```bash
cargo run -- --init
```
### Build
```bash
cargo run -- --build --release
```
### Run
```bash
cargo run -- --run --release
```
### Test
```bash
cargo run -- --test test_hello.miva
```
### Clean
```bash
cargo run -- --clean
```
## Language
The Miva language is compiled to C++ code, which is then compiled to native machine code using g++.
### Type system
- `int`
- `float32`
- `float64`
- `bool`
- `string`
- `char`
- `array`
- `ptr`
- `box`
- `null`
- `ptrany`
### Safety levels
- `safe` - safe by default
- `unsafe` - requires explicit declaration
- `trusted` - special function that bypasses safety checks
### Example
```miva
// main.miva
export func main() -> int {
let x: int = 10
let y: int = 20
return x + y
}
```
Build and run:
```bash
cargo run -- --build --release
cargo run -- --run --release
```
## Architecture
- Miva source → AST → Symbol Table → Semantic Analysis → Type Checking →
Macro Expansion → C++ Header → C++ Source → g++ → Object Files → Link → Native Binary