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
Create platform/ module in core crate with all platform trait interfaces (PlatformConfigStore, PlatformSecretStore, PlatformKvStore, PlatformBackend, PlatformHttpClient, PlatformGeo), ClientInfo struct, PlatformError enum, and RuntimeServices struct. Wire async_trait with target-conditional ?Send on wasm.
ClientInfo (extract-once pattern)
ClientInfo is a plain data struct, not a trait. Each adapter constructs it once at the entry point from the platform request (before dispatching to handlers) and stores it in RuntimeServices. Handlers read it from there — no request parameter needed. This follows the existing GeoInfo::from_request() pattern.
RuntimeServices stores it as pub client_info: ClientInfo (not Box<dyn ...>).
PlatformHttpClient and EdgeZero ProxyClient
PlatformHttpClient is a superset of EdgeZero's existing ProxyClient (sync send + async fan-out via send_async + select, backend correlation, WASM-compatible). These must not coexist as parallel abstractions. File an EdgeZero issue to generalize ProxyClient into an HttpClient trait before PR 6 merges. During Phase 1, the trusted-server defines its own PlatformHttpClient backed by Fastly SDK calls; when EdgeZero's generalized HttpClient lands, swap to implementing that trait instead.
Done when
Traits compile on host + wasm
Object-safety static assertion + dummy RuntimeServices unit test pass
Activity
[-]EZ PR 2: Define platform traits, PlatformError, RuntimeServices[/-][+]Define platform traits, PlatformError, RuntimeServices[/+][-]Define platform traits, PlatformError, RuntimeServices[/-][+]Define platform traits, ClientInfo, PlatformError, RuntimeServices[/+]