SVM: Move protobuf into separate conformance crate #1946
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The use of
prost
and protobuf fixtures in the SVM crate's test suite depends on abuild script using
prost-build
. Since Cargo doesn't currently offer a smooth way toadd test-only build scripts, this build script gets run whenever someone imports
solana-svm
.The
prost-build
library requires the host operating system to have the protobufcompiler installed in order to successfully execute the build script to build the protobuf
bindings.
Rather than impose this resource requirement on downstream users in their applications,
since we only use the protobuf bindings to test the SVM, we can instead extract them
into a separate crate for testing only.
Summary of Changes
Extract the protobuf files, the
prost-build
build script, and theproto
module outof
solana-svm
tests and into a new cratesolana-svm-conformance
.Note the new crate is non-publish.