Skip to content

feat(db): fastedge::db::kv (gcore:db/kv-sync) + db_kv example - #94

Closed
godronus wants to merge 2 commits into
feat/db-interfacefrom
feat/db-interface-kv
Closed

godronus wants to merge 2 commits into
feat/db-interfacefrom
feat/db-interface-kv

Conversation

@godronus

@godronus godronus commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #93 (base feat/db-interface): fastedge::db::kv, Database KV over gcore:db/kv-sync.

  • wit submodule → FastEdge-wit feat/db-interface-kv; generate! adds kv-types + kv-sync
  • src/db.rs: db::kv re-exports the generated types (Database, Op, OpResult, SetOptions, KvValue, Error, ...), plus Default for SetOptions (always write, no expiry)
  • examples/http/wasi/db_kv: per-user rate limit and a visit counter in one atomic batch. Same keys, limits and responses as the JS examples/db-kv.

Decisions needed

# Decision Proposal
1 API surface Generated types as they are, with no wrapper (like db::sql)
2 Async None: Rust stays on kv-sync

Tested: doctests compile; the example runs on fastedge-run against Upstash (requests 1-5 → 200, 6th → 429).

Related: #93 (base), G-Core/FastEdge-wit#10, G-Core/FastEdge#661, G-Core/FastEdge-sdk-js#158

@godronus godronus closed this Oct 30, 2026
@godronus
godronus deleted the feat/db-interface-kv branch October 30, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant