fix(bots): use thin LTO and Cargo.lock in rusher build

- Switch from full LTO (lto=true) to thin LTO to avoid memory/ICE issues
- Include Cargo.lock in Dockerfile for reproducible dependency resolution
- Use opt-level='s' (balanced size/speed) instead of 'z' (max size opt)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-24 07:39:16 -04:00
parent 6899b2efa0
commit 04cf11be83
2 changed files with 3 additions and 3 deletions

View file

@ -16,5 +16,5 @@ tracing-subscriber = "0.3"
[profile.release]
strip = true
opt-level = "z"
lto = true
opt-level = "s"
lto = "thin"

View file

@ -2,7 +2,7 @@
FROM rust:1.85-alpine AS builder
WORKDIR /app
COPY Cargo.toml ./
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release