musl linux compilation working from now on

This commit is contained in:
Priec
2026-08-14 18:10:46 +02:00
parent 6725444c18
commit 0e6207fb44
6 changed files with 21 additions and 4 deletions

11
.env_template_musl Normal file
View File

@@ -0,0 +1,11 @@
JWT_SECRET=<GENERATE-A-SECRET>
RUST_DB_MODE=embedded
KOMP_AC_POSTGRES_DIR=./data/postgresql
RUST_DB_NAME=komp_ac
RUST_DB_USER=postgres
RUST_DB_PASSWORD=<GENERATE-A-DATABASE-PASSWORD>
RUST_DB_HOST=127.0.0.1
RUST_DB_PORT=5433
RUST_DB_MAX_CONNECTIONS=5
GRPC_LISTEN_ADDRESS=[::1]:50051
PG_DUMP_DIR=./data/dumps

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ AGENT_TESTING_NOTES.md
AGENT_TESTING_NOTES_CLIENT.md
AGENT_TESTING_NOTES_WEB.md
run_bins/
result

2
client

Submodule client updated: e7ae5a9ff6...be0c552638

View File

@@ -21,7 +21,7 @@ Output: `result/bin/server`.
The resulting executable is intended for 64-bit Linux kernels. Run it normally:
```sh
cp .env_template .env
cp .env_template_musl .env
# Replace JWT_SECRET in .env before starting.
./result/bin/server server
```

View File

@@ -157,9 +157,14 @@ bootstrapRustPlatform.buildRustPackage {
SQLX_OFFLINE = "true";
RUSTFLAGS = "-Ctarget-feature=+crt-static";
preBuild = ''
cp -r ${source}/.sqlx .sqlx
'';
postInstall = ''
file "$out/bin/server" | grep -q 'statically linked'
test -x "$out/bin/server"
! readelf -l "$out/bin/server" | grep -q 'Requesting program interpreter'
! readelf -d "$out/bin/server" | grep -q '(NEEDED)'
'';
meta = {

2
server

Submodule server updated: f075e3a1f4...f8371df81f