-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating code via a binary #37
Comments
There actually used to be a protoc plugin , I do sympathize with the external |
Thanks for thoughtful reply! There are some upsides we might miss out on: It can be nice to look at the generated code and if the Rust file is in the project less-fancy editors like vim can still do autocompletion on the protobuf structs. This might be less of an issue with this crate since there are not getters and setters. I will try it out and will let you know how it works out in our project. |
If you need to look at the generated code, you can find it in |
Going to close this out, but feel free to re-open if you still feel like a |
@danburkert |
@sercand I'm not seeing why the |
@danburkert Because we need the proto files and protoc at build-time and I don't like distributing proto files. Pre-generating solves the problem missing proto files and protoc on the device. For example, I use Raspberry PI to build some projects and it seems that prost-build cannot download Linux arm64 protoc binary so I can't generate proto files on Raspberry PI. |
I have a couple issues with the current approach:
If anyone here has found a way around these, I'd love to hear from you. |
@abreis, I'm having the exact same issue with VS Code. I think I understand why to generate the files this way, but I feel it's not very straight forward to work with them like that. |
Thanks for this, really excited about this project!
I just tried to see if I could use this in an existing project. The protobuf definition files are in a different repo there and the build setup assumes that the generated code is present. I think the
prost-build
approach is great, but just generating the code can also have advantages.Reading the readme it seems to imply that it's possible to generate the code, but I could not find any
cargo install
ready binaries in one of the crates. Is it possible to use the classicprotoc
approach usingprost
currently?The text was updated successfully, but these errors were encountered: