tafia / quick-protobuf

A rust implementation of protobuf parser
MIT License
446 stars 82 forks source link

pb_rs: Make main.rs dependencies optional #179

Closed lexxvir closed 3 years ago

lexxvir commented 3 years ago

Hi @tafia !

I use quick-protobuf in the no_std env. When I link pb_rs as build-dependency to my crate I get following error:

   Compiling memchr v2.3.3
   Compiling env_logger v0.7.1
error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7m-none-eabi` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `memchr`.

It seems env_logger & clap crates somehow "leak" their deps into the dependency tree.

I made those deps optional because when using pb_rs as a library they don't need.

tafia commented 3 years ago

Thanks