Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Launch this workflow with the "Run workflow" button in the Actions tab of the repository.
#
# See https://github.com/github/twirp-rs/blob/main/CONTRIBUTING.md#releasing for more details.
name: Create release PR

permissions:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Release and unpublished twirp/twirp-build packages
# This workflow only publishes releases for PR's created by create-release-pr.yml
#
# See https://github.com/github/twirp-rs/blob/main/CONTRIBUTING.md#releasing for more details.
name: Release any unpublished twirp/twirp-build packages

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions crates/twirp-build/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.9.0](https://github.com/github/twirp-rs/compare/twirp-build-v0.8.0...twirp-build-v0.9.0) - 2025-07-31

- See [the changelog for twirp](https://github.com/github/twirp-rs/blob/main/crates/twirp/CHANGELOG.md) for this release.
2 changes: 1 addition & 1 deletion crates/twirp-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "twirp-build"
version = "0.8.0"
version = "0.9.0"
edition = "2021"
description = "Code generation for async-compatible Twirp RPC interfaces."
readme = "README.md"
Expand Down
50 changes: 50 additions & 0 deletions crates/twirp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.9.0](https://github.com/github/twirp-rs/compare/twirp-build-v0.8.0...twirp-build-v0.9.0) - 2025-07-31

### Breaking

- Remove `SERVICE_FQN` to avoid upgrade confusion ([#222](https://github.com/github/twirp-rs/pull/222))

#### 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))

- 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).
- Clients and servers now share a single trait (the rpc interface).
- 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.
- The same ☝🏻 is true for extensions to allow interactivity with middleware.
- 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.
- 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).


#### Breaking: Generate service fqn ([#221](https://github.com/github/twirp-rs/pull/221))

Applications will need to remove any manual service nesting they are doing today.

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:

```rust
let twirp_routes = Router::new()
.nest(haberdash::SERVICE_FQN, haberdash::router(api_impl));
```

This is unnecessary in 0.9.0 (the generated `router` function for each service does that for you). Instead, you would write:

``` rust
let twirp_routes = haberdash::router(api_impl);
```

It is still canonical (but not required) to then nest with a `/twirp` prefix (the examples show this).

### Other

- Allow mocking out requests ([#220](https://github.com/github/twirp-rs/pull/220))
- 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))
- Update the content of the readme ([#216](https://github.com/github/twirp-rs/pull/216))
- Include the readme in rustdoc ([#225](https://github.com/github/twirp-rs/pull/225))
2 changes: 1 addition & 1 deletion crates/twirp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "twirp"
version = "0.8.0"
version = "0.9.0"
edition = "2021"
description = "An async-compatible library for Twirp RPC in Rust."
readme = "README.md"
Expand Down