You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the final item from the progressive complexity plan. WASM sources currently implement Source (read-only). Extending them to implement WritableSource would let users build fully custom CRUD backends in TinyGo.
The WASM module would need to export a WriteItem(action, data) function (or similar) that tinkerdown calls for Add/Update/Delete operations. The TinyGo WASM SDK would need a corresponding update.
Implementation notes
WasmSource already has IsReadonly() (returns true) — change to check if the module exports a write function
Add WriteItem that calls the WASM module's exported write function
Update the wasm-source template (cmd/tinkerdown/commands/templates/wasm-source/) to show a writable example
Progress (M5 Phase 3, #310) — CLI parity landed; keeping this open
tinkerdown cli now constructs wasm sources (createCLISource previously fell through to "unsupported source type for CLI"), so a WASM source has the same CRUD surface on the CLI as under serve. Also fixed a load-breaking bug found while writing the docs: docs/sources/wasm.md and the wasm-source template used a non-existent module: key (the real key is path:) and config: (real: options:), so following the docs failed to load. A Read-only vs. writable section now documents the write-export contract + CLI parity.
Verified running:tinkerdown cli … list quotes returns rows; tinkerdown cli … add against a read-only module returns Error: source is read-only; a unit test covers construct + Fetch + IsReadonly + the WriteItem guard error.
Why this stays open: the feature this issue names — a successful write through a write-exporting module — still has zero verified coverage in any transport (CLI or WebSocket). "Verify, don't infer" found the assumption that examples/lvt-source-wasm-test/ is a writable path to be wrong: quotes.wasm is read-only (no write export), it's the only .wasm in the repo, and there's no TinyGo in this environment to build a write-exporting fixture (a committed one that can't be rebuilt would be the #295/#297 provenance trap). Tracked as #311 — a reproducible TinyGo fixture wired into make + a write-landing test over CLI and WS. This issue closes when that write path is demonstrated end-to-end.
Activity
adnaan commentedon Jul 24, 2026
Progress (M5 Phase 3, #310) — CLI parity landed; keeping this open
tinkerdown clinow constructswasmsources (createCLISourcepreviously fell through to "unsupported source type for CLI"), so a WASM source has the same CRUD surface on the CLI as underserve. Also fixed a load-breaking bug found while writing the docs:docs/sources/wasm.mdand thewasm-sourcetemplate used a non-existentmodule:key (the real key ispath:) andconfig:(real:options:), so following the docs failed to load. A Read-only vs. writable section now documents thewrite-export contract + CLI parity.Verified running:
tinkerdown cli … list quotesreturns rows;tinkerdown cli … addagainst a read-only module returnsError: source is read-only; a unit test covers construct +Fetch+IsReadonly+ theWriteItemguard error.Why this stays open: the feature this issue names — a successful write through a
write-exporting module — still has zero verified coverage in any transport (CLI or WebSocket). "Verify, don't infer" found the assumption thatexamples/lvt-source-wasm-test/is a writable path to be wrong:quotes.wasmis read-only (nowriteexport), it's the only.wasmin the repo, and there's no TinyGo in this environment to build a write-exporting fixture (a committed one that can't be rebuilt would be the #295/#297 provenance trap). Tracked as #311 — a reproducible TinyGo fixture wired intomake+ a write-landing test over CLI and WS. This issue closes when that write path is demonstrated end-to-end.🤖 Generated with Claude Code
https://claude.ai/code/session_018M9pJSPmG6i1D8s6rpEV4h
M5: save & share the captured skill — capture completeness + gallery …