chore: optimize release profile for fullstack and add linux static build target
- Change opt-level from 'z' to 3 for better runtime performance - Use thin LTO for faster compilation with similar results - Remove panic=abort and strip=true to preserve server debuggability - Add --debug-symbols=false to dx build for smaller WASM - Add build-linux target for static musl binary
This commit is contained in:
parent
4595d1c8e7
commit
28d3ed998a
@ -40,11 +40,9 @@ tokio = { version = "1.52", features = ["rt-multi-thread", "macros", "fs", "time
|
||||
|
||||
[profile.release]
|
||||
debug = false
|
||||
opt-level = "z"
|
||||
lto = true
|
||||
opt-level = 3
|
||||
lto = "thin"
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
strip = true
|
||||
|
||||
[features]
|
||||
default = ["web", "server"]
|
||||
|
||||
10
Makefile
10
Makefile
@ -1,10 +1,16 @@
|
||||
.PHONY: dev build css css-watch clean build-editor highlight-css test
|
||||
.PHONY: dev build build-linux css css-watch clean build-editor highlight-css test
|
||||
|
||||
build:
|
||||
@$(MAKE) build-editor
|
||||
@$(MAKE) highlight-css
|
||||
@tailwindcss -i input.css -o public/style.css --minify
|
||||
@dx build --release
|
||||
@dx build --release --debug-symbols=false
|
||||
|
||||
build-linux:
|
||||
@$(MAKE) build-editor
|
||||
@$(MAKE) highlight-css
|
||||
@tailwindcss -i input.css -o public/style.css --minify
|
||||
@dx build --release --debug-symbols=false --target x86_64-unknown-linux-musl
|
||||
|
||||
highlight-css:
|
||||
@cargo run --bin generate_highlight_css
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user