Parent: #563
Phase: #567
Summary
Migrate main.rs from #[fastly::main] to an undecorated main() with Request::from_client(). Required because stream_to_client() / send_to_client() are incompatible with #[fastly::main]'s return-based model.
Changes
- Replace
#[fastly::main] fn main(req: Request) -> Result<Response, Error> with undecorated fn main()
- Use
Request::from_client() to get incoming request
- Explicit error handling via
to_error_response().send_to_client()
- All non-streaming routes use
resp.send_to_client()
- No
fastly::init() needed (doesn't exist in SDK 0.11.12)
File: crates/trusted-server-adapter-fastly/src/main.rs:32-68
Plan
See docs/superpowers/plans/2026-03-25-streaming-response.md — Task 6