Skip to content

build: Add optional Docker build args to speed up Cargo builds#541

Open
mdrissel wants to merge 1 commit intoRightNow-AI:mainfrom
mdrissel:fix/docker-build-speedup
Open

build: Add optional Docker build args to speed up Cargo builds#541
mdrissel wants to merge 1 commit intoRightNow-AI:mainfrom
mdrissel:fix/docker-build-speedup

Conversation

@mdrissel
Copy link

Summary

This adds optional build arguments (LTO and CODEGEN_UNITS) to the Dockerfile, defaulting to the existing production-optimized profile settings.

These parameters allow developers who are frequently rebuilding the Docker image to skip Link Time Optimization and increase codegen units using --build-arg, massively speeding up the container build times without affecting the default optimized release binary.

Details

  • ARG LTO=true and ARG CODEGEN_UNITS=1 added to keep parity with Cargo.toml [profile.release] default.
  • Developers can now use docker build --build-arg LTO=false --build-arg CODEGEN_UNITS=16 . for ultra-fast iteration.

Checklist

  • Keeps default behavior intact
  • No secrets or API keys in diff

Adds LTO and CODEGEN_UNITS arguments that default to optimized prod settings but can be overridden (e.g., LTO=false, CODEGEN_UNITS=16) by developers for faster iteration.
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.

1 participant