swerver v0.1.0-alpha.24: drop pre-encoded, std.json /json, add async-db + fortunes#863
Merged
Merged
Conversation
Brings the engine entry up to the standard learned from the tuned work: - pre-encoded response registry OFF (preencoded:false): no pre-computed response bodies, no validator-shaped JSON - /json serialized per request via the framework's std.json-based ctx.jsonValue (comptime fast path, alpha.24), not hand-rolled bufPrint - in-memory static file cache ON (cache_static_files:true) with .br/.gz precompressed negotiation, a standard optimization that is rules-permitted for an engine entry (static profiles carry no type rules for engines) - adds async-db and fortunes profiles (native async PG client, db_routes.zig) - one multi-listener process for all four protocol ports (was four instances) - pins swerver v0.1.0-alpha.24 Every response comes from the real router and handlers. The only caching is of static file contents (real bytes, fresh headers per request), not response bodies.
ef3c55e to
3b89b9d
Compare
Contributor
Author
|
/benchmark -f swerver |
Contributor
|
👋 |
Contributor
Benchmark ResultsFramework:
Full log |
Contributor
Author
|
/benchmark -f swerver --save |
Contributor
|
👋 |
Contributor
|
|
Contributor
Author
|
/benchmark -f swerver --save |
Contributor
|
👋 |
Contributor
Benchmark ResultsFramework:
Full log |
MDA2AV
approved these changes
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the existing
swerverengine entry to serve every response through the real router and handlers, and adds the database profiles.Changes vs the current entry (alpha.15):
/jsonvia the framework'sstd.json-basedctx.jsonValue(comptime-specialized fast path) instead of hand-rolledbufPrint. Serialized per request from live data.async-dbandfortuneson swerver's native async PostgreSQL client (pipelined, prepared-statement cache, park/resume)..br/.gzprecompressed negotiation. Standard caching, permitted for an engine-type entry; real bytes with fresh headers per request, not memoized response bodies.Validated with
scripts/validate.sh swerver: 57 passed, 0 failed across all 16 subscribed profiles (json full-schema, static + precompressed, async-db, fortunes included).