allow specifying `protoc` binary instead of forcing to build one from scratch
timotheecour opened this issue · comments
Timothee Cour commented
on OSX it's just brew install protobuf
; I'd like to just be able to use that binary (eg maybe in nimcfg or initialization code or something, via protoc_binary=$homebrew_D/bin/protoc
)
eg, useful in case user has some custom build of protoc, or doesn't want to recompile from scratch (time consuming: 480 seconds) etc
Oskari Timperi commented
This is something that should be implemented already (maybe it's a bit undocumented :-). findCompiler()
should take care of this by:
- checking the environment variable
NIMPB_PROTOC
- checking if
protoc
is in path by usingos.findExe()
- checking if nimpb_protoc is installed and using that if it is
We also currently have a hard dependency on nimpb_protoc in our nimble-file, but I think that could be just removed. Users can install it if they need it, if it is documented well enough.