Library completion plan — Developer Preview
See the project master plan for overall phases, learning materials, platform work and milestone acceptance.
Updated for SDK 0.19.0 MongoDB typed-document CRUD, following MySQL/MariaDB 0.18.0. Source/live-server and final artifact results remain separate evidence in the versioned release report; the previous 0.18.0 exact SDK passed49 installed tests and six generated-language tests per engine with no failures or skips. This is a work queue and evidence map, not a claim that the remaining libraries are implemented. New implementation results belong in the current [checkpoint](NEXT-RUN.md) and their versioned validation report.
คำว่า **“อยู่ระหว่างทดลอง” ไม่ได้แปลว่ายังไม่มีโค้ด**: HTTP, records, Optional, I/O และ Redis ใช้งานในขอบเขตที่ระบุแล้ว แต่ยังมีข้อจำกัดและแพลตฟอร์มที่ต้องตรวจเพิ่ม PostgreSQL มี record find/execute และ bounded pool แล้ว ส่วน transaction callback เผยแพร่ใน0.17.0 แล้ว รุ่น0.18.0เพิ่ม MySQL/MariaDB record find/execute และมี source tests กับ server จริงแยกกัน ส่วน MongoDB เพิ่ม native typed-document CRUD ใน 0.19.0 แล้ว; SQL Server ยังต้องต่อ typed codecs และ language binding การปิดงานต้องมีโปรแกรมตัวอย่างที่รันจริง ผลทดสอบ และเอกสารตรงกับ SDK ที่แจก ไม่ใช่เปลี่ยนป้ายสถานะอย่างเดียว
Features shown on the website
| Feature | Implemented now | Evidence available | Work before broader support |
|---|---|---|---|
| Cooperative HTTP and request arenas | Typed GET/POST routes; path/query/header access; response headers; bounded bodies; request arenas retained across suspension; cooperative deadlines | Current Linux source TCP suites cover routing, request access, JSON and legacy HTTP; exact 0.14.0 installed tests pass | Fairness/overload and long-running resource tests; memory escape review before new task APIs; platform execution. A non-yielding CPU handler cannot be preempted by its deadline |
| Immutable records and typed JSON | Named fields; strict input; Optional fields; scalar, record and enum lists; bounded JSON output | Compiler/native/WASM checks plus native TCP JSON tests; browser executes pure records, not JSON APIs | Database codecs with explicit numeric/NULL rules; adversarial decoding and allocation review. Schema validation does not validate business rules |
| Optional values and errors | some/none; lazy, once-only fallback; fallible Optional with separate error/absence handling; successful early return | Native and WASM regression evidence; installed examples | Typed database error information and cancellation outcomes; retain separate absence/error behavior in every new binding |
I/O without await | Cooperative sleep, yield_now and Redis calls; generated native async functions | Compiler/runtime and native integration evidence | Structured tasks/join and cancellation semantics; blocking-operation boundary. CPU-heavy work still occupies the single application thread |
| Redis language binding | PING, GET/find, SET with TTL, DEL; TLS by default; bounded admission and deadlines | Historical isolated Redis runs, including 0.10.0 HTTP trial; current release unit/installed evidence is separate | Consistent input/resource limits; current real-server failure/recovery matrix; explicit reconnect/write-outcome policy. No implied Cluster, Sentinel, pub/sub, Lua or transaction support |
| PostgreSQL native binding | Single-record find/execute, strict scalar/Optional codecs, verified TLS, bounded pool and task-local transaction callbacks | Versioned published 0.15–0.17 source, live PostgreSQL and artifact evidence | Multi-row results, broader platform coverage and transaction fault/soak matrix |
| MySQL / MariaDB | Native single-record find/execute, positional values, strict result codecs and per-call verified TLS; parameter target coercion remains server-defined | Exact ZIP passed49 installed tests and six generated-language tests per engine on separate MySQL8.4.8/MariaDB11.8.9 fixtures, no failures/skips | Pool/transaction ownership, handshake-cleanup review and broader compatibility |
| Other database adapters | Experimental Rust adapters for MongoDB and SQL Server | Historical compilation/unit evidence; no completed real-server matrix | Language bindings, strict codecs, bounded results, pools, transactions and live compatibility tests, in that order |
The [0.14.0 report](validation/2026-12-03-release0140/result.json) records 138 compiler/unit tests and 47 exact-ZIP installed tests on Linux x86_64, plus reused unchanged source evidence for 66 TCP and 25 formatter tests. These counts are suite-specific; they do not validate every database or every platform. Playground Run and the single-thread tradeoff documentation are already implemented and should not be recreated as new milestones.
The 0.14.1 implementation closes Redis boundary inconsistencies: GET/find/SET/DEL keys are capped at 4,096 UTF-8 bytes before connection setup; SET input and decoded GET/PING results are capped at 1 MiB. TTL uses positive signed milliseconds, subject to the server's absolute-expiry range. The final SDK artifact passed 21 tests against an isolated real Redis 8.4.0, including exact/oversized Unicode keys, non-dispatch, value limits, expiry, cancellation and Optional recovery. All five native adapter groups also compile and pass 18 library unit tests; those results do not establish non-Redis server compatibility. The exact ZIP passed 47 installed SDK tests without skips. See the current downloadable validation report for complete release evidence.
Database implementation queue
Ship one complete native use case at a time. Keep unfinished APIs out of the public SDK contract. All fixtures must be isolated and disposable; tests must never discover or reuse production credentials.
The SDK now vendors its Redis and PostgreSQL dependency paths; 0.15.0 adds typed record lookup and execute. The initial offline metadata attempt failed because the standalone driver workspace had no cached registry dependencies. A subsequent authorized online check succeeded: PostgreSQL and all five adapter groups compile with their locked dependencies. This resolves dependency access, not server compatibility or language integration. The PostgreSQL graph is vendored and an isolated verified-TLS PostgreSQL17.6 fixture is available; keep the original lockfiles and private fixture credentials out of source.
| Order | Database | Existing foundation | Next usable milestone | Completion evidence |
|---|---|---|---|---|
| 1 | Redis | Language binding and multiplexed asynchronous client | Close concrete bounds/recovery defects; exercise the existing cache API against a current disposable server | Present/missing/empty values, expiry, invalid UTF-8, size limits, disconnect/deadline and no accidental write retry; actual generated .one execution |
| 2 | PostgreSQL | Verified-TLS session, bound parameters, query/execute, poisoned failed/cancelled sessions | CRUD and bounded pool published; 0.17.0 adds named Bool! transaction callbacks with commit/rollback, exclusive ownership and bounded lifetime | Real PostgreSQL round-trip, bound-value injection case, NULL/type mismatch, TLS/auth rejection, deadline/cancellation and bounded result tests |
| 3 | MySQL and MariaDB | Parameterized native sessions and verified TLS | 0.18.0 adds single-record typed find/execute and CRUD; pool/transaction language ownership remains future work | Separate MySQL 8.4.8 and MariaDB 11.8.9 source/live fixtures; final artifact results remain separate in the versioned report, never relabel one server pass as the other |
| 4 | MongoDB | BSON find-one/insert-one/delete-one/ping adapter | 0.19.0 adds native exact-ID document CRUD, strict scalar/Optional codecs, bounded BSON/arena copies and shared verified-TLS client | Missing document versus error, schema/type mismatch, identifiers, TLS/auth, deadline and cleanup on a real fixture; driver background tasks documented |
| 5 | SQL Server | Tiberius session, bound parameters, TLS and bounded row count | Parameterized language read/write with explicit supported TDS types | Real SQL Server fixture, NULL/type conversion, affected rows, TLS/auth, cancellation and unknown write outcome |
| 6 | Dragonfly | Redis protocol path | Validate the implemented basic-key language API against an actual Dragonfly version | Independent command/expiry/failure evidence; Redis success is not Dragonfly evidence |
SQLite remains a separate planned library, requiring an explicit blocking-work boundary before native integration. Do not silently run blocking database calls on the application executor.
The 0.17.0 transaction API exposes postgres_transaction(handler [, record]). The named handler returns Bool!: either successful Bool commits, including false; fail rolls back. Caught database errors and nested transaction attempts still prevent commit. The callback is task-local for concurrent HTTP requests. It allows one prepared SELECT/INSERT/UPDATE/DELETE/WITH statement per database call, uses READ COMMITTED / READ WRITE, and has a 30-second cooperative total deadline with operations bounded to five seconds or the remaining lifetime. .one does not expose isolation/read-only options, savepoints or transaction handles. Disconnect does not prove immediate server cancellation, and a lost COMMIT response can mean unknown outcome. See the PostgreSQL contract and exact versioned evidence for the shipped artifact.
SDK0.18.0 MySQL/MariaDB uses mysql_find and mysql_execute, one verified-TLS session per call, eight active binding slots and32 admission waiters. Result schema/NULL decoding is strict, but parameter target types are not validated: server coercion applies and protocol NULL erases the Optional value's declared scalar kind. No MySQL pool or transaction language API is included. Source-generated CRUD/error/boundary programs passed separately on MySQL8.4.8 and MariaDB11.8.9; the exact SDK archive passed49 installed tests without skips; the same artifact also passed six generated-language tests per engine without failures/skips; consult the versioned report for exact evidence. See the MySQL/MariaDB contract.
MongoDB 0.19.0 exposes mongodb_find/insert/replace/delete with a required application-supplied String _id. Source execution passed seven language test methods on owned MongoDB 7.0.48 with verified TLS/SCRAM; consult the exact artifact report for distribution evidence. MongoDB 8.0.38 could not start in this environment because required sysfs CPU files were absent; this is not an 8.x compatibility pass. Next implementation is SQL Server typed scalar/Optional codecs and bound parameters, followed by language binding and its own real-server fixture.
Shared gates for every new binding
- **Define the usable API and types.** Bind query values rather than concatenate user input. Map database NULL to Optional without hiding errors. Reject unsupported representations; decimal, timestamp and binary data must not be silently narrowed into existing scalar types. Test present empty values separately from absence.
- **Bound work and results.** Specify admission, acquisition/connect/query deadlines, row and byte limits, and arena ownership. Document whether a bound applies before wire allocation, after decoding, or only before copying into the request arena. A row-count limit alone is not a memory limit.
- **Add connection lifecycle and transactions.** Use bounded pools with health/expiry/graceful close and exclusive transaction leases. Define begin/commit/rollback and cancellation behavior. Discard sessions with uncertain protocol state; a lost commit response can mean an unknown outcome. Never silently retry a potentially applied write.
- **Prove an application path.** Compile and run a
.oneCRUD example, including HTTP/JSON where applicable, against a disposable real server. Test errors, cancellation, saturation and restart. Protocol fixtures are useful but do not establish server compatibility. Record unavailable or failed fixtures as such. - **Package and explain the same implementation.** Rebuild compiler/WASM as needed; retain browser rejection of unsupported DB execution; test the exact final SDK ZIP and checksums. Publish native examples, Thai/English instructions and precise limits together. Reuse earlier evidence only when the tested inputs remain unchanged.
Platform and stability boundary
Recorded installed-artifact execution through 0.18.0 is on Linux x86_64 with separately provisioned Rust and preexisting build tools, not a clean operating system. Current macOS, Windows and Linux arm64 execution remains unverified; historical macOS results belong to their original artifacts. Each new database also needs its own server/version/TLS matrix, regardless of host SDK results.
Keep Developer Preview until the release gates have evidence. Migrations, observability, security review, sustained overload and clean installation remain required work; a compiled adapter or passing happy-path CRUD example alone does not establish production readiness. The language specification, database contracts and current checkpoint remain the implementation references.