SOL-BASHRS-003 // bashrs
Rust-to-POSIX Release Packager
Compile a memory-safe Rust packaging script into a portable zero-dependency POSIX shell script for air-gapped hosts.
Measured delta: 0 bashisms; runs identically on dash, ash, and bash (412 B)
Before (Failing Anti-Pattern)
#!/bin/bash declare -A map=([a]=1) # non-POSIX bashism fails on dash/alpine tar -czf dist/app.tar.gz src/
After (Verified Code)
fn main() {
let artifact = "dist/app.tar.gz";
println!("packaging {artifact}");
}
Verification Contract
schema: bashrs.contract.v1 target: posix-sh invariants: - zero_bashisms: true - shellcheck_clean: true
Verified CLI Command & Output
$ bashrs build --target posix release.rs -o release.sh bashrs build: emitted release.sh (412 B, POSIX.1-2017 clean)