github / twirp-rs

Twirp RPC for Rust
MIT License
24 stars 2 forks source link

Expose twirp via generated code. #39

Closed jorendorff closed 4 months ago

jorendorff commented 5 months ago

A package that uses twirp-build should expose to its downstream users all the types they need. This includes twirp::Router, Client, Context, and TwirpErrorResponse. To help users get this right, twirp-build generated code now automatically re-exports twirp.

The downstream users can still do whatever they were doing, but if they hit the versioning problem described in #38, they now have a fix, namely, change their code to use haberdash::twirp::Client; in place of use twirp::Client;.

Closes #38.