WokeLang: A Human-Centered Programming Language
[](https://github.com/hyperpolymath/wokelang/actions) [](https://ocaml.org) [](https://rust-lang.org) [](https://vyper.readthedocs.io)
WokeLang is a programming language designed for human collaboration, empathy, and safetyβwithout sacrificing power or performance. It combines:
-
Pythonβs readability with Rustβs performance.
-
Hindley-Milner type inference with JavaScriptβs expressiveness.
-
Unique features like
thanks to,only if okay, andmeasured infor ethical, self-documenting code.
-
[π Quick Start](#-quick-start)
-
[π Key Features](#-key-features)
-
[π¦ Project Structure](#-project-structure)
-
[π Development](#-development)
-
[π Examples](#-examples)
-
[π― Next Steps](#-next-steps)
-
[π€ Community](#-community)
git clone https://github.com/hyperpolymath/wokelang.git
cd wokelang
# Install dependencies (asdf + tools)
asdf install # installs rust, deno, idris2, zig
# Build
cargo build --release
2. Run the REPL
cargo run --release -- repl
Example REPL Session:
wokelang> remember x = 5 measured in km
wokelang> x + 3 measured in km
Result: 8 measured in km
3. Run Examples
# Hello World
cargo run --release -- run examples/01_hello.woke
# Fibonacci
cargo run --release -- run examples/13_fibonacci.woke
# All examples
ls examples/*.woke
4. Build & Execute
# Compile to bytecode
cargo run --release -- compile examples/01_hello.woke -o hello.wbc
# Run on VM
cargo run --release -- run-vm hello.wbc
```markdown
## π Key Features
| Feature | Example | Why Itβs Special |
|-----------------------|------------------------------------------|-------------------------------------------|
| **Human Syntax** | `to add(a, b) -> a + b` | Reads like plain English. |
| **Empathy Annotations** | `@feeling(confident=true)` | Codes with emotional context. |
| **Consent Gates** | `only if okay "Delete?" { ... }` | Ethical scaffolding for dangerous ops. |
| **Gratitude Blocks** | `thanks to { "Alice" β "Fixed X!" }` | Acknowledges contributors in code. |
| **Units of Measure** | `5 measured in km` | Prevents unit-related bugs. |
| **Pipelines** | `data then clean then analyze` | Intuitive data transformations. |
| **Vyper FFI** | `vyper call "gratitude.add_entry"` | Immutable, auditable blockchain ops. |
| **WASM Target** | Compile to run in browsers/Node.js. | Portable and fast. |
## π¦ Project Structure
```bash
wokelang/
βββ .bot_directives/ # Bot constraint files for gitbot-fleet
βββ .claude/ # Project-specific AI instructions
βββ .github/workflows/ # CI/CD (Hypatia, CodeQL, Scorecard)
βββ .machine_readable/ # Machine-readable metadata
β βββ 6scm/ # SCM checkpoint files
βββ contractiles/ # Contractile definitions
β βββ dust/ # External dependencies
β βββ k9/ # Security constraints
β βββ lust/ # Desired features
β βββ must/ # Required features & must runner
β βββ trust/ # Trust boundaries
βββ docs/ # Documentation
β βββ architecture/ # Architecture docs (COMPILER-ROADMAP.adoc)
β βββ sessions/ # Development session reports
β βββ ABI-FFI-README.adoc # ABI/FFI integration guide
β βββ DEPLOYMENT.adoc # Deployment documentation
β βββ GAP-ANALYSIS.adoc # Implementation gaps
β βββ NEXT-STEPS.adoc # Development roadmap
β βββ PALIMPSEST.adoc # License philosophy
β βββ PROVEN.md # proven library integration
β βββ WORKERS.adoc # Worker documentation
βββ examples/ # Example WokeLang programs
βββ ffi/
β βββ zig/ # Zig FFI implementation (C ABI)
β βββ src/
βββ license/ # License files
β βββ PMPL-1.0-or-later.txt
βββ scripts/
β βββ install-hooks.sh # Install git hooks
β βββ setup.sh # Setup script
βββ site/ # wokelang.org website
β βββ content/ # Markdown content
β βββ templates/ # Tera templates
β βββ config.yaml # Site configuration
βββ src/
β βββ abi/ # Idris2 ABI definitions with formal proofs
β β βββ Foreign.idr
β β βββ Layout.idr
β β βββ Types.idr
β βββ ast/ # Abstract Syntax Tree
β βββ interpreter/ # Tree-walking interpreter
β βββ lexer/ # Token generation (logos)
β βββ parser/ # Parser (tokens β AST)
β βββ stdlib/ # Standard library modules
β β βββ array.rs
β β βββ chan.rs # Go-style channels
β β βββ io.rs # File I/O with consent
β β βββ math.rs
β β βββ net.rs # HTTP with consent
β β βββ string.rs
β β βββ time.rs
β βββ typechecker/ # Hindley-Milner type inference
β βββ vm/ # Bytecode VM
β β βββ bytecode.rs
β β βββ compiler.rs
β β βββ machine.rs
β β βββ optimizer.rs
β βββ main.rs # CLI entry point
β βββ repl.rs # REPL
βββ tests/ # Test suite
βββ .tool-versions # asdf tool versions (rust, deno, idris2, zig)
βββ AI.a2ml # AI assistant instructions
βββ Cargo.toml # Rust dependencies
βββ ECOSYSTEM.scm # Ecosystem relationships
βββ META.scm # Architectural decisions
βββ STATE.scm # Current project state
βββ README.adoc # This file
## π Development
### Must Runner (Contractile Enforcement)
WokeLang uses a **Mustfile** (in `contractiles/must/`) to enforce mandatory checks:
```bash
# Run all mandatory checks (security, tests, format)
must run
# Individual checks
just lint # Security checks
just test # Test suite
just fmt # Code formattingMustfile defines requirements that MUST pass before commits/releases. See contractiles/ for full contractile system:
- must/ - Mandatory requirements (MUST pass)
- lust/ - Desired features (WANT to have)
- dust/ - External dependencies
- trust/ - Trust boundaries
- k9/ - Security constraints
Required Tools (managed via asdf): - Rust 1.84.0 - Compiler infrastructure - Deno 2.1.4 - Runtime (NO Node.js/npm) - Idris2 0.7.0 - ABI with formal proofs - Zig 0.13.0 - FFI C-compatible implementation
# Install asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
# Install plugins
asdf plugin add rust
asdf plugin add deno
asdf plugin add idris2
asdf plugin add zig
# Install versions (from .tool-versions)
asdf install
# Build
cargo build --release