No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-08-28 13:58:56 +01:00
src update to axum 0.8 2025-01-25 00:23:09 +00:00
.gitignore initial commit 2024-05-15 12:26:09 +01:00
Cargo.lock update to axum 0.8 2025-01-25 00:23:09 +00:00
Cargo.toml update to axum 0.8 2025-01-25 00:23:09 +00:00
LICENSE Add MIT License to the project 2025-08-28 13:58:56 +01:00
README.md initial commit 2024-05-15 12:26:09 +01:00

axum-protobuf

A crate bringing protocol buffers to axum via prost.

Protobuf Extractor / Response

This crate provides a Protobuf extractor and response. The usage is very similar to axum's Json. Refer to their documentation for usage, but replace Json with Protobuf.

The only difference is that T must implement prost::Message + Default.

ProtoJson Extractor

Additionally, this crate provides a ProtoJson extractor that can extract both protobuf and JSON payloads, depending upon the content-type header.

Note that this does not implement IntoResponse but you can use infer_response to convert it into a JSON or protobuf response, based upon the accept header. Otherwise, you can simply convert ProtoJson to Json or Protobuf.