- Work around Dioxus 0.7.9 leaking getrandom_backend=wasm_js cfg into the musl server build by disabling DX's auto flag and setting it only for wasm32 in .cargo/config.toml. - Split build-linux into @client and @server steps so the server build can explicitly enable the server feature and target x86_64-unknown-linux-musl. - Configure the musl linker to use x86_64-linux-musl-gcc.
43 lines
1.1 KiB
Makefile
43 lines
1.1 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 @client --release --debug-symbols=false --wasm-js-cfg false
|
|
@dx build @server --release --debug-symbols=false --target x86_64-unknown-linux-musl --wasm-js-cfg false --features server
|
|
|
|
highlight-css:
|
|
@cargo run --bin generate_highlight_css
|
|
|
|
build-editor:
|
|
@echo "Building Tiptap editor..."
|
|
@cd libs/tiptap-editor && npm ci --include=dev && npm run 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
|