build: production profile, justfile adjustments

This commit is contained in:
2026-05-17 23:10:58 +02:00
parent d891a14a46
commit 48b1d2821f
2 changed files with 64 additions and 58 deletions
+4 -2
View File
@@ -55,12 +55,14 @@ debug-assertions = true
overflow-checks = true
lto = false
panic = "unwind"
codegen-units = 1
incremental = true
[profile.release-lto]
[profile.production]
inherits = "release"
debug = false
strip = true
debug-assertions = false
overflow-checks = false
lto = true
incremental = false
codegen-units = 1
+18 -14
View File
@@ -2,14 +2,18 @@ export RUSTFLAGS := "-C target-cpu=native"
export WEBKIT_DISABLE_COMPOSITING_MODE := "1"
export DOCKER_CONFIG := env_var_or_default("DOCKER_CONFIG", ".lanspread-peer-cli/docker-config")
build:
cargo tauri build --no-bundle -- --profile dev
run:
cargo tauri dev
cargo tauri dev --release
build:
cargo tauri build --no-bundle #-- --profile dev
bundle:
cargo tauri build -- --profile production
fmt:
cargo +nightly fmt
just --fmt
_fix:
cargo fix
@@ -43,20 +47,20 @@ LANSPREAD_GATEWAY := "192.168.1.1"
peer-cli-net:
mkdir -p "$DOCKER_CONFIG"
docker network inspect {{LANSPREAD_NET}} >/dev/null 2>&1 || \
docker network inspect {{ LANSPREAD_NET }} >/dev/null 2>&1 || \
docker network create -d macvlan \
--subnet={{LANSPREAD_SUBNET}} \
--gateway={{LANSPREAD_GATEWAY}} \
-o parent={{LANSPREAD_PARENT_IFACE}} \
{{LANSPREAD_NET}}
--subnet={{ LANSPREAD_SUBNET }} \
--gateway={{ LANSPREAD_GATEWAY }} \
-o parent={{ LANSPREAD_PARENT_IFACE }} \
{{ LANSPREAD_NET }}
peer-cli-run NAME: peer-cli-net
mkdir -p ".lanspread-peer-cli/{{NAME}}/state" ".lanspread-peer-cli/{{NAME}}/games"
docker run --rm --init --network {{LANSPREAD_NET}} --name "lanspread-peer-cli-{{NAME}}" -i \
-v "$PWD/.lanspread-peer-cli/{{NAME}}/state:/state" \
-v "$PWD/.lanspread-peer-cli/{{NAME}}/games:/games" \
mkdir -p ".lanspread-peer-cli/{{ NAME }}/state" ".lanspread-peer-cli/{{ NAME }}/games"
docker run --rm --init --network {{ LANSPREAD_NET }} --name "lanspread-peer-cli-{{ NAME }}" -i \
-v "$PWD/.lanspread-peer-cli/{{ NAME }}/state:/state" \
-v "$PWD/.lanspread-peer-cli/{{ NAME }}/games:/games" \
lanspread-peer-cli:dev \
--name "{{NAME}}" \
--name "{{ NAME }}" \
--games-dir /games \
--state-dir /state \
--catalog-db /app/game.db