The Somali Programming Language.
# Soplang
> The Somali Programming Language
Soplang is a programming language with syntax inspired by Somali, making programming more accessible to Somali speakers. It combines static and dynamic typing in one language with a focus on clarity and ease of use.
**The implementation is in Rust.** Soplang runs through a compiled pipeline: Cranelift JIT for `run` and an AOT build path for standalone binaries. See COMPILER_PLAN.md.
## Project structure
| Path | Description |
|------|-------------|
| **src/** | Rust implementation: lexer, parser, semantic, HIR, runtime, Cranelift JIT, and AOT build backend. |
| **examples/** | Soplang example programs (`.sop` files). |
| **benchmarks/** | Compiler benchmark programs, RESULTS.md, README, and `run_benchmarks.sh` to regenerate results. |
| **legacy-interpreter/** | Legacy interpreter code, now in the separate repo `soplang/soplang-interpreter`. |
| **docs/** | Documentation (installation, language reference, contributing). |
| **windows/**, **linux/**, **macos/** | Platform-specific build and packaging scripts. |
## Features
- **Dual type system** — Static typing (`abn`, `qoraal`, etc.) and dynamic typing (`door`)
- **Somali-based syntax** — Keywords and concepts in Somali
- **Modern paradigms** — Functional, procedural, and object-oriented support
- **Interactive shell** — REPL powered by the compiled JIT pipeline
- **Compiled execution** — Cranelift JIT for running files, AOT build for standalone binaries
## Example
```sop
qor("Salaan, Adduunka!") // Hello, World!
door magac = "Sharafdin"
abn age = 25
hawl salaam(qof) {
celi "Salaan, " + qof + "!"
}
qor(salaam(magac))
```
## Running Soplang
Build and run:
```bash
cargo build --release
./target/release/soplang examples/hello.sop # JIT run
./target/release/soplang -i # REPL
./target/release/soplang -c 'qor("Salaan!")'
./target/release/soplang --build examples/hello.sop -o hello_aot
./hello_aot
```
Or: `make build`, `make run FILE=examples/hello.sop …