Skip to content

Spin KV store implementation #73

@aram356

Description

@aram356

User Story

As a developer deploying to Fermyon Spin, I want to use the EdgeZero KV store API, so that I can store and retrieve key-value data from my Spin application using the same interface as Fastly, Cloudflare, and Axum adapters.

Background

The KvStore trait and KvHandle are defined in edgezero-core. Fastly, Cloudflare, and Axum adapters all implement this trait. The Spin adapter currently has no store support — the manifest validator explicitly rejects [stores.kv] for Spin. Spin provides a native key-value component via the spin-sdk crate.

Acceptance Criteria

  • SpinKvStore type implements the KvStore trait from edgezero-core using the spin-sdk key-value API
  • SpinKvStore is exported from edgezero-adapter-spin
  • Manifest validation in edgezero-core recognises spin as a supported KV store adapter
  • Contract tests (key_value_store_contract_tests! macro) pass for SpinKvStore
  • No Tokio or native-only dependencies introduced (WASM-compatible only)
  • cargo clippy and cargo fmt pass

Affected Area

Adapter -- Spin

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions