Development Roadmap
colang (the Co language compiler) follows a staged route: first fully implement a C compiler, then tailor and extend it into the Co language.
Version Policy
Versions follow MAJOR.MINOR.PATCH:
- 0.* — Development and testing. Features and syntax may change; no cross-version compatibility guarantee.
- 1.* — Official release. Public contracts are frozen; backward compatibility is guaranteed.
- 2.* — Bootstrapping. The compiler itself rewritten in Co.
- 3.* — Product finalization. Beyond bootstrapping, converged into a final, production-ready stable form.
Within 0.*, MINOR bumps denote milestones (a key Co-layer capability). PATCH bumps are small Co-layer prerequisites or C-base fixes between two milestones.
0.* Milestones
| Version | Theme | Status |
|---|---|---|
| V0.1.0 | C compiler | Released |
| V0.2.0 | Co entry model + public | Released |
| V0.3.0 | Linking | Released |
| V0.3.1 | Windows GUI & winapi.co | Released |
| V0.3.2 | Linux native ELF toolchain | Released |
| V0.4.0 | class | Released |
| V0.4.1 | Diagnostics conformance & winapi | Released |
| V0.6.0 | Complex core slice + stdlib headers + linker diagnostics | Released |
Details for 1.* / 2.* / 3.* will be finalized by the maintainer before 0.* wraps up.
Released
V0.1.0 — C compiler
- Full C17 coverage plus key C23 features (
_BitInt,nullptr,auto,boolfollowing C++ semantics, attribute syntax, etc.). - Hand-made
colibstandard headers to avoid cross-ABI dependencies. - Passes the Fujitsu
c-testsuiteconformance test suite. - Layered compiler structure: lexer → preprocessor → parser → sema → LLVM codegen, producing a single
.bcthat is handed to an external linker.
V0.2.0 — Co entry model + public
- Top-level statements execute in source order; a user
mainis not required (the compiler synthesizes the entry). - Coexistence of a user-written
mainand the synthesized entry; top-levelreturn V;sets the process exit code. - The
publickeyword marks exported symbols;-o *.dll/-o *.soselects the output kind by file extension. - Three-way entry rule: bare statements present → normal execution; only
main→ forward without warning; neither → warn and emit an emptyret 0.
V0.3.0 — Linking
First delivery covers import (.co source merge) and the linking core (checked items below); unchecked items roll to later milestones.
-
import(.cosource merge): syntaximport * | name [as alias], … from ("file" | module_name);; consumes.cosources only,publicbeing the sole cross-module visibility gate; top-level statements of imported modules run once at first load, unified before the main entry in topological order; path dedup + DFS cycle detection reporting the full chain; identifier formfrom aequalsfrom "a.co"(same directory only). - The compiler links on its own:
-cemits a COFF.obj, and the default action links the object into an executable — no dependency on an externalclang. -
-o <name>.dllproduces a Windows dynamic library: with an export table, and a.libimport library generated alongside the base name. -
[[lib("user32")]]declares library attribution, with no command-line flag needed. - Static CRT linked by default: the produced exe ships without requiring the VC runtime to be installed.
- Multi-module
.objmerging,.dll/.libconsumption, static library output. -
importextended to consume.obj/.dll/.libas importable modules (bundling compile-time declaration metadata). - Module-alias-limited access:
m.f(),m.x. - Refinement of
DllMainsynthesis and top-level body triggering for DLL outputs. - User-visible command-line arguments
argv: delivered via route A (.cotop-level entry has built-inargc(int) +argv(char**), C-form and self-contained, iterated by theargccount withargv[argc]==NULL), decoupled from the array-with-length infrastructure;argvas a globally visible, self-length-carrying string-array value type still awaits D37 (same batch asstring/general arrays).
V0.3.1 — Windows GUI & winapi.co
- Windows GUI subsystem and
WinMainentry:[[subsystem("windows")]]or definingWinMainswitches the artifact to a console-less GUI program;WinMainis mutually exclusive with top-level bare statements. winapi.coreplaceswindows.h: a starting subset, expanded through V0.4.0 to 323 prototypes / 39 struct-union layouts / 396 constants (SDK-verified), library attribution via[[lib(...)]]; a practical subset of programmatic GUI APIs (window, message loop, memory-DC drawing, clipping, text metrics, system colors).constconsistency: read-only enforcement (diagnostics matching clang);public const intvalues flow across modules into array dimensions andswitchcaselabels, with non-constant labels now rejected instead of silently folded to 0.- First batch of attribute semantics:
[[nodiscard]]/[[noreturn]]in effect;[[deprecated]]same-position duplicates accepted first-wins. - C-conformance batch: designated initializers across the chain (chained designators, promoted anonymous aggregates,
unionhosts, mask-merged bit-field initialization, DFS continuation),sizeof/_Alignofin constant contexts, universal character names (\uXXXX/\UXXXXXXXX) in identifiers and literals, prefixed character constant typing,_Alignascontext constraints and cross-declaration consistency,static_assertin more scopes. - Diagnostics quality:
typedefalias spelling restoration, column alignment with clang, up-front diagnostics for by-value allocation of incomplete types. - Flat single-level release package:
colang.exe + include/(standard headers located next to the compiler, no-Ineeded). - Linux (WSL) build brought up: the colang compiler itself builds and runs its regression suite natively on WSL2/Debian (linking at this stage still relies on an external toolchain).
- Bare tags in the Co layer (C++ style): in
.cosources astruct/union/enummay be used as a type without its keyword (Point p;), including apublictag of an imported module. - Release version strings extended to four segments
MAJOR.MINOR.PATCH.Build(the fourth is a build counter, shown by-vand in the PE version info of artifacts).
V0.3.2 — Linux native ELF toolchain
- A single target/data-model abstraction (
__LP64__/__LLP64__) drives predefined macros, type widths, code generation and linking, eliminating the front-end/back-end data-model split. - On Linux an in-process
lld::elfstatically links the local glibc/libgcc into a native ELF executable (no external linker);crt1.o/libc.a/libm.a/libgccare located automatically. --target <triple>cross-emits ELF object files and IR.- Native colang build on Linux (LLVM 23.1 built from source, X86+lld); the plct matrix aligned to the Windows baseline.
- Built-in
.rcresource compiler and the--resourceembedding channel (byte-for-byte alignment with rc.exe); the per-module compilation model promoted (independent closure + same-name routing + qualified access);wchar_t/wint_tmade target-aware across the chain; the synthesisedDllMaincarrier for DLLs; const diagnostics aligned with clang. - New default settings header
include/colang.hpreloaded automatically. - Follow-ups (long tail):
.soshared objects, dynamic PIE, x86-64 SysV ABI edge cases, ELF mapping ofwinapi.co, glibc audit of all stdlib headers.
V0.4.0 — class
- Reference type
classwithnewinstantiation andthismember access. - Four lifecycle protocols:
__new__/__retain__/__release__/__delete__. - Automatic reference counting and heap-object reclamation; out-of-scope auto-free.
publicextended to class members.- Static class members accessed via the class name with double colon (
C::m()). - Delivered beyond the original plan: member and parameter types opened up (
classhandles,struct/union/array embedded by value; parameters borrow, members are owned by the host); thedeletestatement for forced destruction and cycle breaking; correct release ongoto/break/continuepath terminations. - Follow-ups (long tail): inheritance and virtual functions; cross-module consumption of a
public classfrom animported module; the class form under multi-obj (--per-module); automatic cycle breaking (currently done withdelete).
V0.4.1 — Diagnostics conformance & winapi expansion
- Diagnostics-conformance wave: compile-time errors/warnings and the diagnostic context realigned with clang and ISO C/C++, converging several silent-wrong-value/misjudgement sites (file-scope
bool/integer constant folding now follows “nonzero is true”). - Diagnostics: every error/warning now shows the offending line with +/-2 lines of surrounding source and a caret;
-fno-diag-contextdisables it. - CLI and source-surface tightening: new
-l/--libto specify external libraries;[[lib]]andclassdefinitions restricted to.cosources (rejected in.c/.h). - Co-layer robustness: fixed the degradation/crash when using a cross-module
public structby value inside animported module. winapi.cocontinues to expand: up to roughly 356 prototypes / 45 struct-union layouts / 503 constants, adding the winsock (ws2_32) socket family, the crypt32 string-encoding family, and more.
V0.6.0 — Complex core slice + stdlib headers
- C complex types
float _Complex/double _Complexcore slice:+ - * /arithmetic,== !=comparison, the constantI(_Complex_I), and the<complex.h>accessorscreal/cimag/conj/cabs/carg/projection(withfvariants). Transcendental functions such ascexp/clog/csqrtand the standalone_Imaginarytype are not yet supported. - Link-time
undefined symboldiagnostics now report the real call-site file, line and column. <threads.h>adds the C11 timed functionsthrd_sleep/mtx_timedlock/cnd_timedwait, and now includes<time.h>sostruct timespecis visible.- Fixed duplicate
publicglobal declarations in one.comodule making cross-module consumers read back the initial value. - Note: this release corresponds to the internal development cycle
0.5.5.
Planned
Planned Co-language-layer features for the 1.* line are registered below (each shipped in a backward-compatible manner); 3.* details will be finalized by the maintainer, and the 2.* goal follows.
Planned language-layer features (1.* line)
- Built-in
string/wstringvalue types: first-class string value types carrying an implicit length, directly comparable and concatenable, added at the Co language layer (beyond C). - Cross-module binary
import:importcurrently consumes.cosources only; planned to consume.dll/.lib/.so/.abinaries directly (the production side is already in place). classinheritance / virtual functions / RTTI: on top of the deliveredclasscore, add single/multiple inheritance, virtual functions and runtime type information, with up- and down-casting.- Full
winapi.cocoverage: the Co modular wrapper of the Win32 API keeps expanding, ultimately covering the full API set via a metadata-driven auto-generation pipeline. - Structured exception handling (
try/catch/throw) (deferred requirement): retained as a language-layer requirement; its design and semantics are not yet finalized or scheduled — this entry registers intent only and is not a release or compatibility commitment.
V2.0.0 — Bootstrap
- Goal: rewrite the colang compiler’s main body in the Co language itself, so the resulting compiler can compile its own source (bootstrap) — transitioning from today’s C++ implementation to a version written in Co that closes the loop by compiling itself.
- Prerequisites: the Co language layer must be complete, correct and fast enough to express an entire compiler; the back-end must first be settled — either bind through a pure-C interface (
LLVM-C) and link prebuilt libraries, or replace LLVM with a self-owned back-end (full bootstrap); and the whole build chain must be able to compile colang with colang itself. (Inheritance / virtual functions / exceptions are not prerequisites of bootstrap, only optional language conveniences when writing a compiler, and are already listed among the 1.* features above.) - Significance: bootstrap is the foundation for reaching product finalization (3.*) — once the compiler can compile itself, it sheds dependence on an external C++ toolchain and enters a long-term self-maintaining stage.
Terminology
- Internal development documents use “milestone”.
- Public-facing manuals (this one) use “release version”.
- Feature wording and error messages reflect actual compiler behavior.