Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ default-members = [
"src/app",
]

[profile.release]
[profile.dist]
inherits = "release"
opt-level = "z" # Optimize for minimum binary size
lto = "fat" # Enable Link-Time Optimization (removes dead code across crate boundaries)
codegen-units = 1 # Maximize optimization at the cost of slower compile times
strip = true # Strip debug symbols and DWARF tables from the final binary
panic = "abort" # Remove unwinding code to reduce binary size
lto = "fat" # Enable aggressive Fat LTO for production builds
codegen-units = 1 # Maximize optimization for production
strip = true # Strip debug symbols
panic = "abort" # Remove unwinding code to further reduce size

[workspace.package]
authors = ["omnect@conplement.de"]
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ COPY --from=vue-build /usr/src/app/dist ./src/ui/dist
# Cache mounts persist compiled dependencies across builds
RUN --mount=type=cache,target=/usr/local/cargo/registry,id=cargo-registry-${TARGETARCH} \
--mount=type=cache,target=/work/build,id=cargo-build-${TARGETARCH} \
cargo auditable build ${OMNECT_UI_BUILD_ARG} --release -p omnect-ui --target-dir ./build && \
cp ./build/release/omnect-ui /work/omnect-ui-bin
cargo auditable build ${OMNECT_UI_BUILD_ARG} --profile dist -p omnect-ui --target-dir ./build && \
cp ./build/dist/omnect-ui /work/omnect-ui-bin

SHELL ["/bin/bash", "-c"]
RUN <<EOT
Expand Down
3 changes: 0 additions & 3 deletions src/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ license.workspace = true
repository.workspace = true
version.workspace = true

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[lib]
crate-type = ["lib", "cdylib"]
name = "omnect_ui_core"
Expand Down
Loading