-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Network requests in build.rs and heavy build dependencies #34
Comments
There are two network requests but they’re only fired if there is no file yet, e.g.,: Lines 15 to 23 in af96212
I’ve noticed Rust gets very slow with build scripts though.
Pretty sure you know more about Rust (ecosystem) than I do, so I’m all ears on what a good way to build files in a Rust project is, other than, ehh, a build script 😅 |
The build script itself is not the issue, it's mostly about how heavy it is. A reasonable alternative would be to put this logic behind an optional feature. On second look the build script also does something it's not supposed to do which is to change the contents in In some ways what this build script does is probably better done in a separate utility for development purposes only and to check-in the output of it regularly. That's what I also generally do myself for similar situations. |
Why are build scripts not supposed to change
That’s exactly what I’m using build scripts for. I guess that isn’t what build scripts in the rust ecosystem are supposed to do. Rust ecosystem is weird sometimes. |
Build scripts are supposed to place content in
build scripts in the rust ecosystem are just there to run additional time at build time. This however seems to be a task that is run during development not at build time (eg: artifacts are checked out). |
Correct. Is this something you would like to work on, or can you otherwise share how you would do this? |
The alpha release of the crate requires tokio and reqwest during build time which are very heavy dependencies. More importantly it seems to be doing HTTP requests in build.rs which is a bad idea.
Could this be implemented in different ways?
The text was updated successfully, but these errors were encountered: