|
| 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.1](https://github.com/github/twirp-rs/compare/twirp-v0.9.0...twirp-v0.9.1) - 2025-08-14 |
| 11 | + |
| 12 | +### Fixed |
| 13 | + |
| 14 | +- Preserve HTTP version in twirp client response ([#235](https://github.com/github/twirp-rs/pull/235)) |
| 15 | + |
| 16 | +### Other |
| 17 | + |
| 18 | +- Bump tokio from 1.46.1 to 1.47.1 ([#231](https://github.com/github/twirp-rs/pull/231)) |
| 19 | + |
| 20 | +## [0.9.0](https://github.com/github/twirp-rs/compare/twirp-build-v0.8.0...twirp-build-v0.9.0) - 2025-07-31 |
| 21 | + |
| 22 | +### Breaking |
| 23 | + |
| 24 | +- Remove `SERVICE_FQN` to avoid upgrade confusion ([#222](https://github.com/github/twirp-rs/pull/222)) |
| 25 | + |
| 26 | +#### 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)) |
| 27 | + |
| 28 | +- 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). |
| 29 | +- Clients and servers now share a single trait (the rpc interface). |
| 30 | +- 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. |
| 31 | +- The same ☝🏻 is true for extensions to allow interactivity with middleware. |
| 32 | +- 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. |
| 33 | +- 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). |
| 34 | + |
| 35 | + |
| 36 | +#### Breaking: Generate service fqn ([#221](https://github.com/github/twirp-rs/pull/221)) |
| 37 | + |
| 38 | +Applications will need to remove any manual service nesting they are doing today. |
| 39 | + |
| 40 | +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: |
| 41 | + |
| 42 | +```rust |
| 43 | +let twirp_routes = Router::new() |
| 44 | + .nest(haberdash::SERVICE_FQN, haberdash::router(api_impl)); |
| 45 | +``` |
| 46 | + |
| 47 | +This is unnecessary in 0.9.0 (the generated `router` function for each service does that for you). Instead, you would write: |
| 48 | + |
| 49 | +``` rust |
| 50 | +let twirp_routes = haberdash::router(api_impl); |
| 51 | +``` |
| 52 | + |
| 53 | +It is still canonical (but not required) to then nest with a `/twirp` prefix (the examples show this). |
| 54 | + |
| 55 | +### Other |
| 56 | + |
| 57 | +- Allow mocking out requests ([#220](https://github.com/github/twirp-rs/pull/220)) |
| 58 | +- 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)) |
| 59 | +- Update the content of the readme ([#216](https://github.com/github/twirp-rs/pull/216)) |
| 60 | +- Include the readme in rustdoc ([#225](https://github.com/github/twirp-rs/pull/225)) |
0 commit comments