|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +## [0.9.0](https://github.com/github/twirp-rs/compare/twirp-build-v0.8.0...twirp-build-v0.9.0) - 2025-07-31 |
| 11 | + |
| 12 | +### Breaking |
| 13 | + |
| 14 | +- Remove `SERVICE_FQN` to avoid upgrade confusion ([#222](https://github.com/github/twirp-rs/pull/222)) |
| 15 | + |
| 16 | +#### Breaking: Allow custom headers and extensions for twirp clients and servers; unify traits; unify error type ([#212](https://github.com/github/twirp-rs/pull/212)) |
| 17 | + |
| 18 | +- No more `Context`. The same capabilities now exist via http request and response [Extensions](https://docs.rs/http/latest/http/struct.Extensions.html) and [Headers](https://docs.rs/http/latest/http/header/struct.HeaderMap.html). |
| 19 | +- Clients and servers now share a single trait (the rpc interface). |
| 20 | +- It is possible to set custom headers on requests (client side) and it's possible for server handlers to read request headers and set custom response headers. |
| 21 | +- The same ☝🏻 is true for extensions to allow interactivity with middleware. |
| 22 | +- All the above is accomplished by using `http::request::Request<In>` and `http::response::Response<Out>` where `In` and `Out` are the individual rpc message types. |
| 23 | +- We have unifyied and simplified the error types. There is now just `TwirpErrorResponse` which models the [twirp error response spec](https://twitchtv.github.io/twirp/docs/spec_v7.html#error-codes). |
| 24 | + |
| 25 | + |
| 26 | +#### Breaking: Generate service fqn ([#221](https://github.com/github/twirp-rs/pull/221)) |
| 27 | + |
| 28 | +Applications will need to remove any manual service nesting they are doing today. |
| 29 | + |
| 30 | +In 0.8.0, server consumers of this library have to know how to properly construct the fully qualified service path by using `nest` on an `axum` `Router` like so: |
| 31 | + |
| 32 | +```rust |
| 33 | +let twirp_routes = Router::new() |
| 34 | + .nest(haberdash::SERVICE_FQN, haberdash::router(api_impl)); |
| 35 | +``` |
| 36 | + |
| 37 | +This is unnecessary in 0.9.0 (the generated `router` function for each service does that for you). Instead, you would write: |
| 38 | + |
| 39 | +``` rust |
| 40 | +let twirp_routes = haberdash::router(api_impl); |
| 41 | +``` |
| 42 | + |
| 43 | +It is still canonical (but not required) to then nest with a `/twirp` prefix (the examples show this). |
| 44 | + |
| 45 | +### Other |
| 46 | + |
| 47 | +- Allow mocking out requests ([#220](https://github.com/github/twirp-rs/pull/220)) |
| 48 | +- Swap twirp and twirp-build readmes. Replace the repo readme with a symlink to twirp's readme. ([#215](https://github.com/github/twirp-rs/pull/215)) |
| 49 | +- Update the content of the readme ([#216](https://github.com/github/twirp-rs/pull/216)) |
| 50 | +- Include the readme in rustdoc ([#225](https://github.com/github/twirp-rs/pull/225)) |
0 commit comments