Skip to content

feature: Rust compilation should use stable build directory #5598

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

Closed
emielbeinema opened this issue Apr 10, 2025 · 0 comments
Closed

feature: Rust compilation should use stable build directory #5598

emielbeinema opened this issue Apr 10, 2025 · 0 comments
Assignees

Comments

@emielbeinema
Copy link

emielbeinema commented Apr 10, 2025

Currently, compiling Rust scripts in windmill takes a very long time. One of the reasons is that the script and all its dependencies are recompiled (in 'release' mode) every time the script is built.

To combat long build times, Cargo, the Rust package manager, by default uses incremental compilation. It reuses compiled assets that have not changed, so it can skip their compilation. However, to be able to do that, Cargo needs the old assets to be in its build directory (at least some specific folders).

Currently, each build process of a Rust script in windmill runs in a fresh build directory, without assets from previous compilation. If windmill would run Rust builds of the same script by the same user in a build directory containing the assets from the previous build, that would speed up the compilation significantly.

In addition (independently from this feature request), using sccache as discussed in #4369 and as described in the Cargo documentation could speed up Rust compilation even across different scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants