fix(macos): statically link liblzma so the app launches (#56)

vtkio (via truck-meshalgo → xz2 → lzma-sys) linked the system liblzma
dynamically, baking a Homebrew path (/opt/homebrew/.../liblzma.5.dylib)
into the macOS binary. The .app then crashed on launch on any Mac
without that exact library. Enable lzma-sys's `static` feature so
liblzma is compiled from the bundled source into the binary, making it
self-contained on every platform (verified: no dynamic liblzma link).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-04 02:34:56 +03:00
1 parent 1b20d7d781
commit e708f90517
2 files changed
+8

No files matched your search

Generated
+1
View File
@@ -23,6 +23,7 @@ dependencies = [
"iced",
"image",
"inventory",
"lzma-sys",
"open",
"printpdf",
"rayon",
+7
View File
@@ -5,6 +5,13 @@ edition = "2021"
build = "build.rs"
[dependencies]
# vtkio (pulled in transitively via truck-meshalgo) depends on xz2 → lzma-sys,
# which by default links the system liblzma dynamically. On macOS that bakes a
# Homebrew dylib path (/opt/homebrew/.../liblzma.5.dylib) into the binary, so
# the .app crashes on launch on machines without that exact library (#56).
# Forcing the `static` feature builds liblzma from the bundled source, making
# the binary self-contained on every platform.
lzma-sys = { version = "0.1", features = ["static"] }
iced = { version = "0.14", features = ["debug", "image", "svg", "advanced", "canvas", "smol"] }
bytemuck = { version = "1.25", features = ["derive"] }
glam = { version = "0.33", features = ["bytemuck"] }