Expand description
Cloudflare R2 implementation of ObjectStore over S3-compat SigV4.
Uses local_driver::s3_sign helpers for signature computation and
reqwest::blocking for HTTP so the ObjectStore trait stays synchronous.
Async consumers wrap calls in tokio::task::spawn_blocking.
§Endpoint
R2’s S3-compat endpoint is https://<account_id>.r2.cloudflarestorage.com.
Region is always "auto". Bucket lives in the URL path:
https://<account_id>.r2.cloudflarestorage.com/<bucket>/<key>.
§list_prefix
Issues GET /<bucket>?list-type=2&prefix=<encoded> (ListObjectsV2) and
parses the <Key>…</Key> elements out of the XML body. Continues with
&continuation-token=<…> while <IsTruncated>true</IsTruncated> so
prefixes larger than the 1000-key page size return complete.
@yah:relay(R630, “Object-store correctness + tooling gaps surfaced by standing up the cr.yah.dev registry”)
@yah:at(2026-07-23T03:06:57Z)
@yah:status(open)
@yah:next(“Both children were found while building yah-cr (the R2-backed OCI registry) on 2026-07-22 and are independent of that work — they are latent defects in shared object-store code that any caller can hit.”)
@yah:next(“Start with the SigV4 child: it is a correctness bug that fails closed but silently constrains every key namespace we can use. The bucket-delete child is additive and can follow.”)
@yah:gotcha(“The SigV4 defect is why cr.yah.dev stores OCI digests as sha256/
Structs§
- Object
Meta - One
<Contents>entry from an R2ListObjectsV2response. - R2Object
Store - R2-backed
ObjectStore.
Constants§
- R2_
ACCESS_ KEY_ ENV - Env var fallback for the R2 access key id.
- R2_
ACCESS_ KEY_ SLOT - Keystore slot for the R2 S3 access key id.
- R2_
SECRET_ KEY_ ENV - Env var fallback for the R2 secret key.
- R2_
SECRET_ KEY_ SLOT - Keystore slot for the R2 S3 secret key.