ctypes bindings to libLLVM-20.so
— no llvmlite. Emits verified LLVM IR (SSA form, phi nodes, alloca/load/store),
native assembly (.s), and object files (.o). Singleton TargetMachine, LLVM optimisation
passes, and a tree-walking interpreter retained alongside the compiled path.
First benchmarks: IR generation in ~1ms, native 10–100× faster than CPython (projected).
var::io (41 fns: files, paths, streams, env),
var::tensor (111 fns: NumPy-backed, linear algebra, activations, distance),
var::http (19 fns: client + server),
var::async (32 fns: channels, futures, parallel_map, mutex, atomic),
var::pipeline (15 fns: execution engine, combinators, streaming),
var::model (14 fns: inference, embeddings, tokenization),
var::data (29 fns: CSV/JSON/NPY, splits, augmentation, metrics).
syn package manager (20 commands: new / build / run /
install / publish / search / repl / fmt / doc). Package format (.synpkg,
syn.toml, syn.lock) with semver resolution and SHA-256
checksum verification. Interactive REPL with :type / :bench / :ir. Source formatter.
Doc generator (Markdown + HTML + JSON). Governance docs, 3 implemented RFCs,
community contributor ladder, and formal stability guarantees.
grammar/VAREK.ebnf.
🚀 Starting a new project
Download varek-v1.0.zip. Unzip, then:
python varek_cli.py new my-projcd my-proj && python ../syn_cli.py runpython ../syn_cli.py repl
Requirements: Python 3.10+, NumPy. LLVM optional (for native emit).
📖 Reading the code
Each zip is a self-contained milestone. Recommended reading order:
v0.1— lexer.py → parser.py → ast.pyv0.2— types.py → unify.py → infer.pyv0.3— llvm_api.py → codegen.pyv0.4— stdlib/*.pyv1.0— packager.py → syn_cli.py
🔬 Academic / research use
Start with VAREK-Spec-Paper-Douglas.pdf for the formal design rationale. Then VAREK-SPEC.md for the grammar and type system. The grammar/VAREK.ebnf inside each zip is the normative grammar definition at each version.
🌐 GitHub / open source setup
- Use VAREK-README.md as
README.mdin the repo root - Host varek-landing.html on GitHub Pages
- Upload
.zipfiles as GitHub Release assets - Copy
docs/GOVERNANCE.mdanddocs/RFC_TEMPLATE.mdfromv1.0into the repo - Add
rfcs/directory for community proposals
🏗️ Extending VAREK
The syn::* stdlib is the primary extension surface. Add a new module in varek/stdlib/mymodule.py, register it in stdlib/__init__.py, and wire it to the runtime. No core language changes needed.
For language changes, open an RFC using the template in docs/RFC_TEMPLATE.md.
⚡ Running the tests
v0.1:python tests/test_varek.pyv0.2:python tests/test_types.pyv0.3:python tests/test_v03.pyv0.4:python tests/test_stdlib.pyv1.0:python tests/test_v10.py
All tests pass green. Total: 659 tests.
MIT License — Free for any use
Copyright © 2025–2026 Kenneth Wayne Douglas, MD.
Permission is granted, free of charge, to any person obtaining a copy of this software
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies,
subject to the condition that the copyright notice and this permission notice appear
in all copies or substantial portions of the software.
This is the most permissive open source license. You can fork it, build commercial products on it, publish papers citing it, or include it in proprietary software — just keep the copyright notice.
| Version | What Ships | Tests | Py Lines | Size |
|---|---|---|---|---|
| v0.1 | Lexer · Parser · AST · Grammar | 109 | 2,546 | 34 KB |
| v0.2 | HM Type Inference · Unification · Schemas | 163 | 5,562 | 60 KB |
| v0.3 | LLVM Codegen · Native Emit · Interpreter · Benchmarks | 97 | 7,792 | 86 KB |
| v0.4 | 7 Stdlib Modules · 261 Functions | 182 | 11,097 | 118 KB |
| v1.0 ✓ | Package Manager · REPL · Formatter · Docs · RFC Process | 108 | 13,006 | 148 KB |
| TOTAL | All versions · All artifacts | 659 | 13,006 | 530 KB |