mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
5b41a06d0c
- `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>
29 lines
1.3 KiB
PowerShell
29 lines
1.3 KiB
PowerShell
# Builds everything (the server, the tool, the client library), release
|
|
# mode, into target\release\: the tool with its own profile (release-tools,
|
|
# Cargo.toml) in target\release-tools\, then copied beside the others.
|
|
# -HybridCrt: the UCRT from Windows instead of linked in, about 180 KB less
|
|
# per program (.cargo/hybrid-crt.toml).
|
|
# Usage: powershell -ExecutionPolicy Bypass -File build.ps1 [-HybridCrt]
|
|
param([switch]$HybridCrt)
|
|
$ErrorActionPreference = "Stop"
|
|
$crt = if ($HybridCrt) { @("--config", ".cargo/hybrid-crt.toml") } else { @() }
|
|
|
|
# rustup's folder isn't always on the PATH (it isn't in every shell here).
|
|
if (-not (Get-Command cargo -ErrorAction SilentlyContinue)) {
|
|
$env:PATH = (Join-Path $env:USERPROFILE ".cargo\bin") + [IO.Path]::PathSeparator + $env:PATH
|
|
}
|
|
|
|
Push-Location $PSScriptRoot
|
|
try {
|
|
cargo build --workspace --exclude bakashrot-tools --release --locked @crt
|
|
if ($LASTEXITCODE -ne 0) { "FAILED: cargo build"; exit 1 }
|
|
cargo build -p bakashrot-tools --profile release-tools --locked @crt
|
|
if ($LASTEXITCODE -ne 0) { "FAILED: cargo build (the tool)"; exit 1 }
|
|
$tool = if ($IsLinux -or $IsMacOS) { "bakashrot" } else { "bakashrot.exe" }
|
|
Copy-Item (Join-Path "target\release-tools" $tool) "target\release" -Force
|
|
} finally {
|
|
Pop-Location
|
|
}
|
|
"Built into $(Join-Path $PSScriptRoot "target\release")"
|
|
exit 0
|