Home

prost

Prost is an open-source Rust library for Protocol Buffers. It provides a fast, ergonomic implementation of Protocol Buffers and a code generation workflow that converts .proto files into Rust types. Prost focuses on Proto3 features and does not implement Proto2 features such as required fields.

Prost centers on generated message types with methods for encoding, decoding, and length calculation. The runtime

Well-known protobuf types, such as Timestamp and Duration, are provided in a separate prost-types crate, simplifying

Prost is an actively developed, open-source project with contributions and documentation from the community. It emphasizes

is
designed
to
be
lightweight
and
memory
efficient,
using
the
bytes
crate
for
buffer
management.
Code
generation
is
performed
by
the
prost-build
crate,
which
is
run
from
a
build
script
and
produces
Rust
types
alongside
implementations
of
the
prost::Message
trait.
reuse
of
common
definitions.
Prost
is
widely
used
in
the
Rust
ecosystem,
particularly
with
gRPC
frameworks
like
Tonic,
which
relies
on
Prost
to
generate
service
messages
and
data
structures
from
.proto
files.
safety,
performance,
and
compatibility
with
standard
Protocol
Buffers
definitions,
making
it
a
common
choice
for
Rust
projects
that
exchange
data
using
protobufs.