-
Notifications
You must be signed in to change notification settings - Fork 525
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
prost_build does not work on no_std #344
Comments
I assume you are using unreleased |
Yes exactly.
This is what I expected, and yet it seems that build.rs also uses no_std if I cross compile to a no_std target, somehow. Anyway, in this case I guess I'll close this and just use a handrolled CLI tool that calls |
For the record, this is a bug and tracked here: It is resolved on nightly with an unstable feature. Let's hope it will stabilize soon. |
I am also experiencing this issue. I am trying to use prost in an embedded application (ARM M4), and have to build the data structures in a separate script. The issue is still there with nightly. Do I need something special in my Cargo.toml file to tell Cargo it can use std in the build dependencies? |
Hi
I am trying to use prost in a no_std target. Everything works great, except that build.rs, which uses
prost_build::compile_protos
, does not work as it relies on std:(via prost-build -> tempfile -> rand -> getrandom).
The funny thing is that compiling the .proto files does not actually depend on my target, as it's a build-step and could be done on
std
.In fact this is how I currently work around it: I can compile the .proto files fine if I compile my project on a standard
std
target, and then copy the resulting.rs
files from the build directory and add it directly to my project.It would be really good to fix up
prost-build
to run onno_std
also, OR to provide a CLI tool which I can run to manually generate the.rs
file outside ofbuild.rs
.The text was updated successfully, but these errors were encountered: