Skip to content

Shared rustc compiled objects? #12054

Answered by FabianLars
FilipeD asked this question in Q&A
Dec 26, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

First of all, your question isn't Tauri specific, everything talked about is "just" Rust.

the files in debug/deps are build artifacts of the dependencies.
the files in debug/build are the build artifacts of the build scripts of the dependencies that do have build scripts.

Shouldn't these be cached in a separate target folder to be used in later/similar projects?

You can have a shared target dir by configuring build.target-dir in the cargo config, using the --target-dir cli flag, or the CARGO_TARGET_DIR env var. While this is generally fine to do, you can't have concurrent builds (of multiple projects) this way. It may also result in more recompilation than desired sometimes.

Alternative…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@FabianLars
Comment options

@FilipeD
Comment options

Answer selected by FilipeD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants