Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: enable SIMD opts for production linux builds on x86-64 bit systems

Sidwebworkse5bdd481368b
diff --git a/.cargo/config.toml b/.cargo/config.toml
deleted file mode 100644
index daefc75cfe..0000000000
--- a/.cargo/config.toml
+++ /dev/null
@@ -1,7 +0,0 @@
-# The assembler's x86_64 Linux deploy target builds for AVX2/FMA (x86-64-v3) so
-# the planner's collision-heavy loops and the Eigen/FCL math vectorize — matching
-# the -march on the C++ collision shim (crates/collision/build.rs). A conservative
-# fleet baseline, NOT target-cpu=native (which bakes the build box's ISA and
-# SIGILLs on older CPUs). Other targets (macOS, arm64) are deliberately untouched.
-[target.x86_64-unknown-linux-gnu]
-rustflags = ["-C", "target-cpu=x86-64-v3"]
diff --git a/apps/assembler/Dockerfile b/apps/assembler/Dockerfile
index 7e6414d23d..bbdac3eb85 100644
--- a/apps/assembler/Dockerfile
+++ b/apps/assembler/Dockerfile
@@ -67,8 +67,17 @@ COPY crates ./crates
COPY apps/assembler ./apps/assembler
# Point the cxx bridges at the static OCCT + static FCL/ccd (build.rs picks
# `static=` when it finds a .a at the prefix). Eigen headers from apt.
+#
+# Build the x86_64 Fargate fleet for AVX2/FMA (x86-64-v3) so the planner's
+# collision-heavy loops and the Eigen/FCL math vectorize — matching the -march on
+# the C++ collision shim (crates/collision/build.rs). Conservative fleet baseline,
+# NOT target-cpu=native (which bakes the build box's ISA and SIGILLs on older
+# CPUs). Lives here (not .cargo/config.toml, which isn't copied into this build
+# context anyway) so it actually applies to the deploy target; env is
+# target-scoped, so cross-compiles/other arches are untouched.
ENV OCCT_PREFIX=/opt/occt OCCT_LINK=static \
- FCL_PREFIX=/opt/fcl LIBCCD_PREFIX=/opt/fcl EIGEN_PREFIX=/usr OCTOMAP_PREFIX=/usr
+ FCL_PREFIX=/opt/fcl LIBCCD_PREFIX=/opt/fcl EIGEN_PREFIX=/usr OCTOMAP_PREFIX=/usr \
+ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C target-cpu=x86-64-v3"
# Cache mounts: the cargo registry and the target dir survive across builds,
# so a code-only change relinks instead of recompiling every dependency.
# The binary is copied out because cache mounts vanish after the RUN.