How to Avoid Recompiling protobuf-src with System-installed Protobuf in libp2p?
#5746
vinay10949
started this conversation in
General
Replies: 1 comment
-
|
I don't see |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm working on project that includes
libp2p(version 0.54.1) in a workspace. I’ve noticed that during the build process,protobuf-srcis being compiled from source, which significantly increases the build time. This is happening despite having Protobuf installed system-wide and setting thePROTOCenvironment variable to point to the system'sprotocbinary.Setup Details:
sudo apt install protobuf-compiler libprotobuf-devprotoc --versionoutputslibprotoc 3.21.9Configuration:
I have set the
PROTOCenvironment variable:export PROTOC=/usr/bin/protocProblem:
Despite having Protobuf installed system-wide, the
protobuf-srccrate still compiles from source during thecargo buildprocess. This has been significantly increasing my build time. I’ve checked the libp2p documentation but couldn’t find any specific flags or features that disable Protobuf-related functionality.What I’ve Tried:
PROTOCenvironment variable: This doesn't stopprotobuf-srcfrom being compiled.libp2pfeatures: There are no clear flags to disable Protobuf usage inlibp2pthat I could find..protofiles: I considered precompiling.protofiles and committing the generated Rust code, but I’m unsure how to integrate this cleanly withlibp2p.Question:
Has anyone encountered this issue or have suggestions on how to force
libp2pto use the system-installed Protobuf binaries, or avoid compilingprotobuf-srcentirely? Iflibp2por one of its dependencies (likeprost-build) is causing this, is there a workaround?Impact:
This is especially problematic in CI environments, where build times are critical. Any tips to reduce build time would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions