Top 50 standard-library items, sequenced by current need.
|
Important
|
This document complements ROADMAP.adoc (language / compiler progress), bindings-roadmap.adoc (framework bindings), and alib-roadmap.adoc (aLib conformance + affine contributions). Where this file disagrees with CAPABILITY-MATRIX.adoc or ECOSYSTEM.adoc, those documents win. Compiled 2026-05-28 from the idaptik PR #107 pilot (hyperpolymath/idaptik#107) + estate-wide stdlib-need inventory. |
- Reading guide
- Inventory snapshot (2026-05-28)
- Tier 1 — Idaptik blockers (runtime + reach)
- Tier 2 — Estate convergence (RSR rewires + coverage)
- Tier 3 — Broadly useful (universals)
- Tier 4 — Concurrency / async / effects
- Tier 5 — Conformance / introspection / advanced
- Cross-cutting observations
- Suggested sequencing
- Tracking
- See also
- License
Each entry carries:
-
Status — one of:
-
○— nothing built -
◐— scaffold or stub only -
◑— partial; coverage / runtime gap -
●— usable today -
◯— blocked by a non-stdlib issue (codegen, runtime, etc.)
-
-
File — the stdlib path the item lives in or should live in.
-
Rationale — what motivates this entry. Where applicable, the concrete consumer that needs it (e.g. an idaptik file path, an RSR-stack hook).
Item numbers are stable across revisions of this document; do not renumber when promoting or deferring items.
|
Note
|
Scope of this roadmap: stdlib items only. Where an item overlaps
with a language-level feature (e.g. async/await, capability types),
the surface here is the stdlib-side API; the language-level work is
tracked in the main ROADMAP. Such items are flagged |
| File | State | Notes |
|---|---|---|
|
|
Imports + re-exports; cross-file |
|
|
Type exists; helpers thin; not reachable from standalone single-file check. |
|
|
Type exists; helpers thin. |
|
|
|
|
|
Type exists; runtime coverage incomplete. |
|
|
Surface present; runtime ops sparse. |
|
|
Arithmetic only; no trig / log / exp. |
|
|
Print / read; no path / env / exit-code helpers. |
|
|
Should consume |
|
|
Should consume |
|
|
Client-side; rewire to |
|
|
Sockets / DNS coverage unclear. |
|
|
Coverage audit needed. |
|
|
Telegram bot coverage. |
|
|
Schema validation; estate-wide a2ml use. |
|
|
|
|
|
Issue #35 Phase 3 closed. |
|
|
Effect-row helpers; tracked-by-main. |
|
|
Trait helpers; sparse. |
|
|
Foundational re-exports. |
|
|
Test framework; coverage audit. |
These ten items are the stdlib gaps surfaced directly by the idaptik
PR #107 pilot. Without them, the next migration tranche stalls at
affinescript check PASS / affinescript eval FAIL — i.e. the type
checker accepts code that the runtime can’t execute.
| # | Item | Status | File | Rationale |
|---|---|---|---|---|
1 |
|
|
|
idaptik |
2 |
* |
|
|
Same site as #1; the pilot reverted from |
3 |
|
|
N/A (codegen) |
Stdlib-adjacent: any iteration over a |
4 |
|
|
N/A (codegen) |
Same disposition as #3 — closed by PR #257. |
5 |
Cross-file |
|
|
idaptik pilot had to define a local |
6 |
Prelude |
|
|
See #5; specific to the |
7 |
Dict runtime — |
|
|
idaptik VM state uses a register map; without runtime dict the VM can’t execute. |
8 |
|
|
|
Per-character cost calculations; idaptik UI code (post-pilot) will need this. |
9 |
|
|
|
Match arms and debug-print sites in idaptik used inline concat throughout. |
10 |
Exhaustive match over imported enums — pattern compiler resolves |
|
pattern compiler + |
Same family as #5/#6; causes the local- |
Estate-wide hooks. The RSR (Rhodium Standard Repository) stack has shipped 5 libraries with stable Zig C-ABIs; the stdlib should be the AffineScript-side consumer for each.
| # | Item | Status | File | Rationale |
|---|---|---|---|---|
11 |
Crypto rewire to |
|
|
RSR-stack convention; supersedes hand-rolled crypto in |
12 |
Http rewire to |
|
|
RSR-stack convention; consumed by OikosBot AffineScript port (Phase 5). |
13 |
Json rewire to |
|
|
RSR-stack convention; needed for HTTP-server accept-loop payload extraction (RSR-stack pending work). |
14 |
GitHub API surface via |
|
new |
OikosBot pattern; Externs convention per Q4 shim. |
15 |
|
|
|
Used everywhere; idaptik pilot wanted |
16 |
|
|
|
Same as #15. Closes the local- |
17 |
Collections trait surface — |
|
|
Required for any non-trivial functional pipeline; tracked-by-main on the language side. |
18 |
Traits coverage — |
|
|
Auto-derive lands as language feature; the trait surface is stdlib. |
19 |
Math expanded — trig (sin/cos/tan/asin/…), log/exp, pow, sqrt, floor/ceil/round |
|
|
idaptik motion + physics; broadly useful. |
20 |
Io expanded — |
|
|
CLI surface for every |
Standard surface that any serious language ships within a few years. Not blocking specific consumers today; included so they’re discoverable.
| # | Item | Status | File | Rationale |
|---|---|---|---|---|
21 |
Time / Duration / Instant — monotonic + wall-clock, formatting, parsing |
|
new |
Universal; everything benchmarked or scheduled needs it. |
22 |
UUID / Random — |
|
new |
Random is in |
23 |
Regex — pattern, match, replace, capture groups |
|
new |
Estate-wide need; backed by a Zig FFI (PCRE2 or RE2 wrapper). |
24 |
URL parser — |
|
new |
Pairs with |
25 |
Base64 / Hex encoding — encode / decode, URL-safe variant |
|
new |
Universal; needed for JWT, image data URIs, etc. |
26 |
Logging surface — |
|
new |
Estate observability requirement; pairs with OTel binding (Tier 4 in bindings roadmap). |
27 |
Date / calendar — |
|
new |
Distinct from #21; calendars are gnarly enough to deserve their own file. |
28 |
Number formatting — fixed-precision, exponent, locale-aware |
|
extension to |
Output side of #19. |
29 |
Float utilities — |
|
extension to |
Floating-point edge cases that idiomatic code routinely gets wrong. |
30 |
Buffer / Bytes type — fixed-length byte buffer with view / slice / read / write |
|
new |
Universal; required for crypto, binary protocols, wasm interop. |
The next layer of language maturity. Most items here are tracked-by-main — the language work lives in the main ROADMAP; the stdlib surface is what consumers see.
| # | Item | Status | File | Rationale |
|---|---|---|---|---|
31 |
Async / await canonicalisation — public surface for |
|
|
Tracked-by-main; row-polymorphic effects mean the surface needs careful design. |
32 |
Promise / Task type — |
|
new |
Companion to #31; concrete handle type. |
33 |
Channel / mpsc — bounded + unbounded, sender / receiver halves (affine fits naturally) |
|
new |
First-class affine resource; AffineScript should make these better than other langs. |
34 |
Mutex / RwLock — guard types, poison handling |
|
new |
Pairs with #33; affine guard makes RAII trivial. |
35 |
Atomic types — |
|
new |
Low-level concurrency primitives. |
36 |
Cancellation tokens — cooperative cancellation, parent / child propagation |
|
|
Idiomatic structured concurrency. |
37 |
Timer / sleep — |
|
|
Pairs with #21; common in idaptik gameplay loops. |
38 |
Select / race — |
|
|
Required for any non-trivial concurrent flow. |
39 |
Stream / observable — pull-based stream of |
|
new |
Pairs with channel (#33) and Fetch/Streams (bindings #26). |
40 |
Actor / mailbox — message-passing actors, supervised |
|
new |
Gleam / BEAM-style; lower priority but valuable for distributed estate use. |
Items that earn their place once the basics are solid.
| # | Item | Status | File | Rationale |
|---|---|---|---|---|
41 |
aLib conformance vectors — implement `aggregate.json’s 20 ops + run its test vectors |
|
new |
See alib-roadmap.adoc for the full track; this is the stdlib-side hook. |
42 |
Effects calculus expansion — capability rows, IO / Net / Async / Random / Time as effect labels |
|
|
Tracked-by-main on the type-system side; stdlib provides the standard labels. |
43 |
Capability / permission types — |
|
new |
Pairs with #42; security-relevant surface. |
44 |
Borrow / move helpers — |
|
|
Tracked-by-main on the borrow-checker side. |
45 |
Diagnostics / pretty errors — |
|
new |
Compiler dogfoods this; library code can emit |
46 |
Reflection / type-info — runtime |
|
new |
Universal escape hatch; needed by serialisation (#47), testing (#48). |
47 |
Serialisation (binary) — |
|
new |
Pairs with |
48 |
Testing expansion — property-based, snapshot, async tests, fixtures |
|
|
Pairs with bindings #48 (test framework binding); coverage audit needed. |
49 |
Bench harness — |
|
new |
Companion to #48; estate has Hypatia perf rules. |
50 |
Doc-comment metadata access — runtime + compile-time access to |
|
|
Powers |
-
Tier 1 is mostly runtime, not surface. Items 1-4, 7-10 all exist at the type-checker level; the gap is
eval/ wasm-codegen execution. This means Tier 1 work is mostly in the compiler (interp + codegen), not in the.affinestdlib files themselves. -
Cross-file
use(#5/#6/#10) is a name-resolver bug, not a stdlib surface gap. The fix is inlib/name_res.ml(or equivalent); the stdlib organisation may also need to change (e.g.Option/Resultalways-imported even without explicituse). -
Tier 2 RSR rewires are mechanical once the calling convention exists (bindings #19). Doing bindings #19 first unblocks #11/#12/ #13/#14 in parallel.
-
Tier 4 is mostly tracked-by-main. The stdlib roadmap captures the surface; the compiler ROADMAP captures the machinery. Don’t duplicate-track.
-
No item in this roadmap is a binding — every binding lives in bindings-roadmap.adoc. The line: if it’s calling into a host runtime via
extern fn, it’s a binding; if it’s pure-AffineScript code that organises types and functions, it’s stdlib. Tier 2 RSR rewires straddle this line — they’re stdlib modules whose implementation calls bindings.
| Phase | Goal | Items |
|---|---|---|
A |
Unblock idaptik PR #107 successor |
#5 (cross-file |
B |
RSR convergence |
bindings #19 (Zig FFI doc) → #11 (Crypto) → #12 (Http) → #13 (Json) → #14 (GitHub) |
C |
Helper coverage |
#15 (Result helpers) → #16 (Option helpers) → #19 (Math expanded) → #20 (Io expanded) |
D |
Universals |
#21 (Time) → #23 (Regex) → #24 (URL) → #25 (Encoding) → #26 (Logging) |
E |
Demand-driven |
Tier 4 + Tier 5; pick when a concrete consumer asks. |
-
Umbrella tracker: (TBD — opened alongside this PR)
-
Per-tier child issues: (TBD — opened alongside this PR)
When a stdlib item’s status changes, update its row in this file in the same PR that lands the change; do not let the table drift.
-
ROADMAP.adoc — language / compiler progress.
-
bindings-roadmap.adoc — framework bindings (host-runtime FFI surfaces).
-
alib-roadmap.adoc — aLib conformance
affine-aware contributions back upstream. -
CAPABILITY-MATRIX.adoc — per-feature readiness (overrides everything).
-
ECOSYSTEM.adoc — Stage A–E contracts.
-
idaptik PR #107 — the pilot that surfaced Tier 1 gaps.