Skip to content

Fix fast build #60

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

Merged
merged 3 commits into from
Jun 15, 2022
Merged

Fix fast build #60

merged 3 commits into from
Jun 15, 2022

Conversation

pretentious7
Copy link
Contributor

PROBLEM:
as mentioned in 86054, hot-reloads take around 10s, mostly due to
linker.

SOLUTION:
use mold, this time via a fast_build script that sets the necessary
cargo env vars, ensures that mold and clang are installed, and runs
cargo build with the correct path for the mold linker.

POSSIBLE IMPROVEMENTS:
may be a good idea to switch the shell script for a zx script. Also
would be nice if cargo build automatically ran fast_build.sh as a
wrapper if the host and profile are correct (ie. linux host, with
dev profile)

This reverts commit 860547f.

PROBLEM: messes up docker push
SOLUTION: remove linker switch

NOTE:
issues mentioned in 86054 still apply, and will be addressed
in this PR.
@pretentious7 pretentious7 marked this pull request as ready for review June 15, 2022 12:23
Copy link
Member

@paulgb paulgb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment, can you also remove .cargo from .dockerignore? Otherwise looks good

PROBLEM:
as mentioned in 86054, hot-reloads take around 10s, mostly due to
linker.

SOLUTION:
use mold, this time via a fast_build script that sets the necessary
cargo env vars, ensures that mold and clang are installed, and runs
cargo build with the correct path for the mold linker.

POSSIBLE IMPROVEMENTS:
may be a good idea to switch the shell script for a zx script. Also
would be nice if `cargo build` automatically ran fast_build.sh as a
wrapper if the host and profile are correct (ie. linux host, with
dev profile)
@pretentious7 pretentious7 merged commit b055f72 into main Jun 15, 2022
@rolyatmax rolyatmax deleted the fix-fast-build branch June 27, 2022 19:35
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

Successfully merging this pull request may close these issues.

2 participants