Skip to content

v0.1.0

Choose a tag to compare

@0mjs 0mjs released this 18 Mar 22:40
· 69 commits to dev since this release

Changelog

Added

  • Added named routes and reverse URL generation with richer route metadata and lookup helpers.
  • Added route introspection APIs, including route lookup by name, route discovery helpers, and mounted-route metadata.
  • Added regex-constrained params with :name<expr> route syntax.
  • Added route-scoped 404 handlers for app and groups.
  • Added Context.Copy() plus exported context lifecycle helpers for acquire/release flows.
  • Added a Binding() builder API for explicit bind flows without removing the simple Bind(...) path.
  • Added multipart file binding support for multipart.FileHeader, *multipart.FileHeader, []multipart.FileHeader, and []*multipart.FileHeader.
  • Added typed bind errors for clearer input/binding failures.
  • Added plain-text body binding, YAML body binding, and TOML body binding.
  • Added YAML and TOML response helpers.
  • Added new benchmark families for invalid JSON, validation failure, multipart upload, header/query/body binding, large JSON payloads, static file hit/miss, nested middleware API paths, and unauthorized reject paths.

Changed

  • Static serving is now fully implemented instead of partially configured: browse mode works, custom index files are honored, and unsafe traversal paths are rejected.
  • Mounted routes now participate properly in route introspection and route metadata.
  • Error ergonomics are richer: HTTPError now carries more structured state, and abort/fail helpers are cleaner for API handlers.
  • Response file download behavior now correctly honors custom attachment/download filenames.
  • The benchmark suite now targets Zinc only against its real framework peers: Gin, Echo, and Chi. ServeMux and HttpRouter were removed from the suite and reporting.

Performance

  • Substantially improved router hot paths across static routes, dynamic params, grouped routes, scenario routing, and method-mismatch handling.
  • Tightened miss/405 behavior and default error-response paths to reduce unnecessary work.
  • Improved param lookup/materialization behavior for routed handlers.
  • Improved route registration performance, especially for static and param-heavy route sets.
  • Improved binder hot paths, especially JSON-heavy API bind cases and cached-body reuse.
  • Kept Zinc strongly ahead on most non-throughput API-path benchmarks in the peer-only suite.

Benchmarks

  • Updated the benchmark reporting to the new peer-only suite and refreshed all tables/results.
  • Current peer-only headline: Zinc wins 65/85 overall and 65/77 non-throughput rows.
  • Throughput remains the weakest category and is now clearly separated in reporting from the stronger request-path and API-path wins.

Docs and Quality

  • Added and updated feature-parity planning docs and scorecards.
  • Added a benchmark-process guide to make future optimization work more disciplined and less regression-prone.
  • Updated README coverage and benchmark snapshots to match the current codebase.
  • Expanded supporting tests across static serving, route features, context helpers, response behavior, multipart binding, and error flows.