mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Merged bakashrot-cert into bakashrot as bakashrot cert, Made the programs smaller, Added a -HybridCrt switch
- `bakashrot cert ca|issue|revoke|show` (same options) replaces bakashrot-cert: aws-lc, the C runtime and clap once, 2.53 MB instead of 2.85 + 1.73 MB on Windows; guides, docs, release.py, Docker updated - The tool built with its own profile, release-tools (panic = "abort", about 15% smaller); the DLL and the server keep unwind - clap without colours and suggestions (40 KB, 9 crates fewer) - SQLite without FTS3/FTS5, R-Tree, dbstat, STAT4, soundex(), extension loading and column metadata (LIBSQLITE3_FLAGS): the server 4.68 to 4.37 MB; a storage test checks they're out - build.ps1 / release.ps1 -HybridCrt (.cargo/hybrid-crt.toml): the UCRT from Windows, about 180 KB less per program, still nothing to install; static stays the default, README.txt says which - revamp.md: what was weighed and left (UPX, fully dynamic CRT, nightly options, OMIT_* flags), aws-lc kept over Graviola (490 KB bigger) and ring (no ML-KEM) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-7
@@ -1,5 +1,6 @@
|
||||
# The BakaShrot server's image: bakashrot-server, with the bakashrot and
|
||||
# bakashrot-cert tools beside it. Built from the repository's root:
|
||||
# The BakaShrot server's image: bakashrot-server, with the bakashrot tool
|
||||
# beside it (bakashrot cert for the certificates). Built from the
|
||||
# repository's root:
|
||||
# docker build -f docker/Dockerfile -t bakashrot-server .
|
||||
# CI builds it for amd64 and arm64 on a version tag, checks it
|
||||
# (docker/test.sh) and pushes it to ghcr.io/aziascreations/bakashrot-server
|
||||
@@ -12,7 +13,7 @@
|
||||
# from outside the container
|
||||
# database = "/var/lib/bakashrot/bakashrot.sqlite"
|
||||
# and the certificates relative to it (ca = "ca.crt", ...). The server runs
|
||||
# as uid 10001, which must be able to read its key (bakashrot-cert writes
|
||||
# as uid 10001, which must be able to read its key (bakashrot cert writes
|
||||
# keys readable by their owner only): chown 10001:10001 config/server-1.key
|
||||
#
|
||||
# docker run -d --name bakashrot -p 7000:7000 \
|
||||
@@ -20,7 +21,7 @@
|
||||
# ghcr.io/aziascreations/bakashrot-server
|
||||
#
|
||||
# Or docker/compose.yml. `docker stop` stops it cleanly (SIGTERM).
|
||||
# The tools: docker run --rm <image> bakashrot-cert ... (or bakashrot ...).
|
||||
# The tool: docker run --rm <image> bakashrot cert ... (or bakashrot push ...).
|
||||
|
||||
|
||||
# --- Build ---------------------------------------------------------------------
|
||||
@@ -30,11 +31,13 @@ FROM rust:1-slim-trixie AS build
|
||||
WORKDIR /src
|
||||
# Only what the programs are built from (Dockerfile.dockerignore).
|
||||
COPY . .
|
||||
# The toolchain rust-toolchain.toml pins, then the release build.
|
||||
# The toolchain rust-toolchain.toml pins, then the release build, the tool
|
||||
# with its own profile (release-tools, Cargo.toml).
|
||||
RUN rustup toolchain install \
|
||||
&& cargo build --release --locked -p bakashrot-server -p bakashrot-tools \
|
||||
&& cargo build --release --locked -p bakashrot-server \
|
||||
&& cargo build --profile release-tools --locked -p bakashrot-tools \
|
||||
&& mkdir /out \
|
||||
&& cp target/release/bakashrot-server target/release/bakashrot target/release/bakashrot-cert /out/
|
||||
&& cp target/release/bakashrot-server target/release-tools/bakashrot /out/
|
||||
|
||||
|
||||
# --- Runtime -------------------------------------------------------------------
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Smoke-tests a server image, as CI does before pushing it: certificates by
|
||||
# its bakashrot-cert, its server started with them, its bakashrot pushing
|
||||
# its bakashrot cert, its server started with them, its bakashrot pushing
|
||||
# and reading back over a Docker network, then `docker stop`, which must
|
||||
# end it cleanly (exit code 0, "stopped").
|
||||
# Usage: docker/test.sh <image>
|
||||
@@ -27,9 +27,9 @@ tool() {
|
||||
}
|
||||
|
||||
docker network create "$name" >/dev/null
|
||||
tool bakashrot-cert ca --name "Image test CA"
|
||||
tool bakashrot-cert issue --name server-1 --server
|
||||
tool bakashrot-cert issue --name tester --role tester
|
||||
tool bakashrot cert ca --name "Image test CA"
|
||||
tool bakashrot cert issue --name server-1 --server
|
||||
tool bakashrot cert issue --name tester --role tester
|
||||
cat >"$work/server.toml" <<EOF
|
||||
[server]
|
||||
listen = "0.0.0.0:7000"
|
||||
|
||||
Reference in New Issue
Block a user