Repository navigation
build(make): add build-local for both binaries from one Cargo invocation - #1324
Merged
Merged
Conversation
…ation
`make install` already builds `future` and `futureos` together — through
scripts/build/build-desktop.mjs, so they share one dependency graph and one
feature unification — but it runs the release profile, and release carries
`lto = "thin"`, which makes every edit recompile the graph under LTO.
`build-local` gives the same selection on the LTO-free `local` profile:
cargo build --profile local -p future-cli -p futureos --bin future --bin futureos
One invocation matters for the same reason it matters in build-desktop.mjs:
selecting both packages at once keeps shared crates compiled once and keeps
feature unification aligned with the shipping build, instead of two runs that
disagree and recompile each other's dependencies.
It writes target/local/{future,futureos} only. It does not install into PREFIX,
stage the Desktop sidecar, build the frontend or bundle — `make install*` and
`make package-desktop` keep owning those, unchanged.
Measured in a fresh worktree: 327 s cold for both binaries; afterwards a
one-line CLI edit rebuilds both in 3.7-3.8 s and a one-line Desktop edit in
3.4 s.
No platform-specific syntax: the target is the same three lines on Windows,
macOS and Linux, and `profile.local` lives in the root Cargo.toml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make installalready buildsfutureandfutureosin a single Cargo invocation throughscripts/build/build-desktop.mjs, so the two share one dependency graph and one feature unification — but it runs thereleaseprofile, andreleasecarrieslto = "thin", which recompiles the whole graph under LTO on every edit.build-localgives the same package selection on the LTO-freelocalprofile:One invocation matters for the same reason it matters in
build-desktop.mjs: selecting both packages at once keeps shared crates compiled once and keeps feature unification aligned with the shipping build, instead of two runs that disagree and recompile each other's dependencies. Measured cold in a fresh worktree: 327 s for both binaries; afterwards a one-line CLI edit rebuilds them in 3.7-3.8 s.It writes
target/local/{future,futureos}only. It does not install intoPREFIX, stage the Desktop sidecar, build the frontend or bundle —make install*andmake package-desktopkeep owning those, unchanged.Commits
build(make): addbuild-localfor both binaries from one Cargo invocation (50d859b96)Verification
Only the
Makefileis touched:make -n build-local→cargo build --profile local -p future-cli -p futureos --bin future --bin futureos.PHONY;make helpshows it next to the siblingbuild-cli-local/build-desktop-localwrappers from build(make): local-profile targets; a steady search row; a panic report proven end to end #1323Notes
releaseis untouched, so what ships cannot drift.target/local/; the frontend build and the Tauri bundle are out of scope.