Skip to content

Edge runtime support (Cloudflare Workers) #1

Description

@frostyhand

People keep asking for an edge deployment, and we would love one, but a honest port is a real refactor rather than a config file. Documenting the blockers so anyone who wants to take a swing knows the shape of the work.

Why it does not run on Workers today

  1. Transport. src/server.ts builds on node:http createServer. Workers want a fetch handler (export default { fetch }). The routing/guardrail/receipt core is transport-agnostic already, so the work is extracting a handleRequest(Request): Response seam and keeping the node server as one of two adapters.
  2. Receipt persistence. The signing key and the hash-chained receipts.jsonl live on disk (~/.axiorank/gateway, src/receipts/keystore.ts and log.ts). Workers have no filesystem. The chain needs a pluggable store: local disk on Node, and KV or a Durable Object (the chain is strictly ordered, so a DO is the natural fit) on Workers.
  3. Signing. Receipts sign with node:crypto Ed25519. Workers support Ed25519 through WebCrypto (crypto.subtle), so signing needs the same abstraction the verifier package already has.

What a good first PR looks like

Any one of the three seams above, kept behind an interface with the current behavior as the default, with tests. No Workers code needed to make progress: the seams are valuable on their own.

If you want to work on this, comment here and we will help you scope it. Until then, the honest answer for edge-ish deploys is the Docker image on Fly.io or Render (both configs ship in the repo).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions