How do their APIs compare?
How do their APIs compare?
About poem-web/poem · 2 messages · last activity 9/11/2026
Poem and Pake aren't really comparable in the sense of "similar APIs" — they're solving completely different problems, and the "API surface" each exposes reflects that.
poem-web/poem — a Rust web framework, exposing a Rust extractor/handler API
Poem's API is built around the #[handler] macro plus trait-based extraction and typed request/response handling. A few concrete surfaces visible in the retrieved code:
ApiExtractortrait (used heavily bypoem-openapi) — types that can be pulled out of a request implementfrom_request, exposeTYPES(e.g.RequestObjectvsParameter), and contribute to OpenAPI metadata viarequest_meta()[poem-openapi-derive/src/request.rs:L119-L158]. This is the core "extractor" API pattern that's central to how handlers declare their inputs.- Derive-macro-generated API metadata —
poem-openapi-derive/src/api.rsbuilds upMetaOperationParamstructs (name, schema,in_type, required, deprecated, explode/style) for each parameter, plus default/example value wiring, so the framework can auto-generate OpenAPI docs from ordinary Rust function signatures [poem-openapi-derive/src/api.rs:L332-L371, L412-L451]. Type/schema registration API for objects — generated impls providename(),schema_ref(), andregister()so a Rust struct can register itself into an OpenAPI schema registry [poem-openapi-derive/src/object.rs:L373-L412].- gRPC code-gen config API —
poem-grpc-build::Configoffers a builder-style API (btree_map(...),bytes(...)) mirroringprost's config, letting users control how.protomap/bytes fields map into Rust collections [poem-grpc-build/src/config.rs:L88-L167]. - Platform integrations like
poem-lambdaexpose aContextextractor implementingFromRequest, so Lambda-specific data (e.g.request_id) is available in handlers the same way any other extractor would be [poem-lambda/src/lib.rs:L1-L33].
So Poem's "API" is a compile-time, trait/macro-driven surface for building typed HTTP/gRPC/OpenAPI services in Rust.
tw93/pake — a desktop app wrapper, no public web-framework API Pake isn't a library consumers extend via traits/handlers; its "API" is more configuration- and runtime-behavior-oriented:
- Build/config API —
PlatformSpecific<T>provides aget()/copied()accessor that resolves to the macOS/Linux/Windows variant at compile time viacfgattributes, used for things likeUserAgentandFunctionONtype aliases [src-tauri/src/app/config.rs:L54-L79]. - In-page JS API —
window.pakeFindis the closest thing to a consumer-facing API, exposingopen,close,next,previous,search,getState, andgetFindShortcutActionfor the injected find-in-page feature [src-tauri/src/inject/find.js:L52-L68, L671-L677]. - Internal Rust helpers, like
build_proxy_browser_arg, which format proxy URLs into Chromium CLI flags (e.g.--proxy-server=socks5://...), tested directly rather than exposed as a public API [src-tauri/src/app/window.rs:L793-L806]. - Dev tooling "API" —
rollup.config.jsdefines a custom Rollup plugin (pakeCliDevPlugin) that spawns child processes to run the CLI and Tauri dev server together, which is a build-pipeline convenience rather than an app-facing API [rollup.config.js:L75-L136].
Bottom line: Poem exposes a rich, typed, macro-generated Rust API meant for other developers to build web/gRPC services on top of. Pake exposes a much narrower, mostly internal surface (a small in-page JS object, platform-config helpers, and build-tooling plugins) since it's an end-user desktop app packager, not a library. There's no meaningful one-to-one API comparison beyond both projects using code generation/config patterns (macros in Poem, cfg-based platform selection in Pake) to reduce boilerplate.
Want to ask your own question?
Open chat for poem-web/poemPublic Q&A. Generated by RepoPilot from the actual source of poem-web/poem. AI answers can be incomplete or stale — verify before relying on them.