yggdrasil/Makefile
xfy 28d3ed998a 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
2026-06-09 10:30:36 +08:00

42 lines
1.0 KiB
Makefile

.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 --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
build-editor:
@echo "Building Tiptap editor..."
@cd libs/tiptap-editor && npm install && npx vite build
@echo "Tiptap editor built."
dev:
@echo "Starting tailwindcss watch and dx serve..."
@tailwindcss -i input.css -o public/style.css --watch & \
TAILWIND_PID=$$!; \
trap 'kill $$TAILWIND_PID 2>/dev/null; exit' INT TERM EXIT; \
dx serve --addr 0.0.0.0
css:
@tailwindcss -i input.css -o public/style.css
css-watch:
@tailwindcss -i input.css -o public/style.css --watch
test:
@cargo test
clean:
@cargo clean
@rm -f public/style.css