Skip to content

Commit

Permalink
*: Support both Prost and rust-protobuf libraries
Browse files Browse the repository at this point in the history
To use Prost, set the `PROST` env var, e.g.,: `PROST=1 make dev`. If using Cargo,
use `--no-default-features --features prost-codec`.

The most notable change is threading the prost-codec/protobuf-codec through the
Cargo.tomls of all crates. In addition, in order to make this work I had to move
integraton tests and benchmarks into their own crate (`tests`). This is because
Cargo features do not interact perfectly with dev-dependencies.

We're using a Git dep for Prost in order to get some optimisations which are on
master, but not in the latest release. We can change to a crates.io dep when there
is another release.

We must allow the `identity_conversion` lint because there are some conversions
which are meaningful with rust-protobuf, but no-ops with Prost.

The changes to src/coprocessor/endpoint.rs are because Prost does not permit
setting a custom recursion limit. We only did this for tests previously. We
now use the default recursion limit all the time for both codecs; the test must
be adjusted so that we hit the higher limit.

Signed-off-by: Nick Cameron <nrc@ncameron.org>
  • Loading branch information
nrc committed Nov 12, 2019
1 parent 3445b32 commit 9e4fdc8
Show file tree
Hide file tree
Showing 112 changed files with 547 additions and 214 deletions.
171 changes: 160 additions & 11 deletions Cargo.lock

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

Loading

0 comments on commit 9e4fdc8

Please sign in to comment.