Skip to content

feat(foundryup): add a --jobs flag while building from source #8021

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
May 31, 2024

Conversation

NiloCK
Copy link
Contributor

@NiloCK NiloCK commented May 31, 2024

Motivation

I needed to build foundry from an active PR. The build failed repeatedly on my machine due to overruns on system resources.

(Process expanded to eat all ram, eventual build failures or system crashes. Ubuntu 22, 16GB ram, for what it's worth).

Solution

I added a --jobs flag to foundryup, which is passed to the cargo build command. This is effectively a throttle on the build process. My local build worked fine after specifying -j 2. With no flag, foundryup uses nproc to recover the prior default behaviour of using all available CPUs.

Also, I clarified the usage string to indicate commands that build from source vs installing via compiled binaries.

Colin Kennedy added 2 commits May 31, 2024 13:57
this flag is passed on to cargo build.

It's useful for people building on lower powered machines (<=16 GB Ram).
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

makes sense, one typo

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks!

@DaniPopes DaniPopes merged commit 08ef489 into foundry-rs:master May 31, 2024
19 checks passed
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