Skip to content

Tracking: v0.1.0 release #11

Description

@chrischtel

Umbrella tracking issue for the first tagged, announced, public release of K2.

K2 is Windows-only today; the language, comptime/metaprogramming engine, standard library, and core tooling are substantial and covered by a 200+ test suite (currently green, vm corpus 74/74).

What v0.1.0 is

The first public milestone: a tagged GitHub release with prebuilt Windows binaries, accurate docs, an honest "what works / what doesn't" story, and an announcement. Not feature-complete, not multi-platform — a usable, documented, experimental snapshot.


✅ Landed (the foundation)

  • Language — structs/packed structs, enums + payloads, exhaustive match (ranges/string/guard patterns; value-producing match and if expressions), ints i8i128/u1u128 + floats, pointers/arrays/slices/optionals with debug checks, casts, distinct/opaque types, monomorphized generics, UFCS extension methods (incl. on temporaries), in-struct methods, lambdas + iterators.
  • Errors & memoryT ! E, fail, ?, catch, !!, ??, success/error defer modes, tail-forwarding, qualified error types; Arena zones with compiler-enforced non-escape.
  • Comptime & metaprogramming — a bytecode VM that executes the compiler's own IR; #run/#if; #quote/#insert with re-checking + hygiene; template macros with $-splice; #for; #parse; the ast.* value surface you can match on; #compiler hooks + compiler_decls(); #derive.
  • Reflectiontype_info, typeid, Anystd.serde (reflection-driven JSON, no per-type code).
  • Generics$T: constraints, where { … } predicates, named constraints, output type params.
  • Modules — file-as-module, :: namespacing, per-module name mangling.
  • C interop#extern, Win64 by-value aggregate ABI, thin C fn pointers, k2 bindgen (libclang → K2).
  • Backend / build — LLVM backend, in-process LLD + a from-scratch K2 linker (k2lnk), k2 build running build.k2 in the comptime VM → real exes/DLLs.
  • Standard library (25 modules)io, fmt, mem, strings, slice, vec, map, list, heap, math, rand, color, bits, ptr, path, time, crypto, serde, net (TCP/UDP), atomics, thread, fs, process, c, build.
  • Toolingk2 lsp (diagnostics/completion/hover/def/symbols), a tree-sitter grammar + Zed extension, and the #test comptime test lane (a failed assertion fails the build like a type error).

🎯 Before v0.1.0

Release mechanics

  • Decide the version & clean up tags. Stray local tags v0.1.0v0.1.4 already exist (unpushed, no releases — dev checkpoints from 2026-06-24). Recommend: delete the unpushed dev tags and tag the real release v0.1.0 (or start at v0.2.0).
  • Drop -dev at tag time: CLI version and build.zig.zon 0.1.0-dev0.1.0.
  • CHANGELOG.md / release notes — none exists yet.
  • Cut a GitHub Release with prebuilt Windows binaries (k2.exe + k2lld.dll / runtime DLLs) and an LLVM/SDK note.

Docs & consistency — done in this pass, verify

  • README status table & stdlib table rewritten to match reality.
  • ROADMAP.md rewritten (landed vs v0.1.0 vs after; real known bugs).
  • docs/15 test-runner status; docs/00 doc index completed.
  • build.zig.zon version aligned to the CLI (0.1.0-dev).
  • Examples sweep — confirm everything under examples/ builds & runs on a clean checkout.
  • Getting started verified from scratch (Zig + LLVM; Windows-only caveat up front).

Correctness gaps — fix or document for 0.1.0

  • Interface-through-interface dispatch → LLVM verification error (blocks a fully generic std.fmt.Display). Fix, or document as a known limitation.
  • Struct/aggregate == → backend can't emit an aggregate compare (fails at runtime, not just comptime). Document as a known limitation; the real fix is the reflection-driven structural compare (post-0.1.0).
  • Triage any other accepted-but-incompletely-lowered constructs.

Announcement

  • Short post (the metaprogramming-VM angle is the hook) with a runnable example and the honest "Windows-only, experimental" framing.

⚠️ Known limitations (ship-with, document)

  • Windows x86-64 only — the frontend is platform-independent; the Linux/ELF backend is designed (docs/14) but not implemented.
  • No external packages — single-tree until the package manager (docs/16).
  • Interface-through-interface dispatch; struct == (above).

🗺️ Explicitly post-0.1.0 (not blocking)

  • Testing — runtime lane (k2 test, per-test zones + leak checks, TTY/TAP/JSON), reflection-driven structural diffs (also unlocks struct ==), property tests, snapshots (docs/17 §5).
  • Toolingk2 fmt, k2 doc, k2 repl, LSP v2/v3.
  • Linux/ELF backend (docs/14); package manager (docs/16).
  • Wider metaprogramming — more ast.* node kinds, building ast.* without #quote, bare-call macros, typed macro params, an auto-generated std.ast.
  • Interface composition / owned dynamic objects / downcasting, SIMD, contracts (#require/#ensure); #when/#bench/#on_start/#on_exit.

Related issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttrackingUmbrella issue tracking many related TODOs

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions