Skip to content

Releases: paiml/bashrs

Nightly Build

19 Apr 05:15
bc9680f

Choose a tag to compare

Nightly Build Pre-release
Pre-release

Automated nightly build from main.

Date: 2026-04-18T18:29:37Z
Commit: bc9680f

This is a prerelease. For stable releases, see the latest tagged version.

v6.65.0

27 Feb 09:23

Choose a tag to compare

v6.64.0

15 Feb 21:39

Choose a tag to compare

Full Changelog: v6.63.0...v6.64.0

v6.63.0

13 Feb 07:09

Choose a tag to compare

v6.63.0 — corpus expansion, transpiler improvements, linter hardening

- Corpus: 97.0/100 A+ score, +5400 entries (17,882 total)
- Makefile emitter raw output mode
- Nested __if_expr lowering for let-assignment and return
- Parser println! macro fix for escaped quotes
- SEC001/SEC002 linter improvements
- Comprehensive complexity refactor in parser.rs

v6.62.0 — Variable shadowing, 15,106 corpus entries

10 Feb 22:25

Choose a tag to compare

Fixed

  • Variable Shadowing in Loops (P0): save/restore pattern for let-bindings
  • 80 corpus failures eliminated (97.0 → 97.5 A+)
  • Lexer panic on bare heredoc
  • Pipe-in-condition parser (#133)
  • Dynamic array indexing with runtime variables
  • For-in array expansion

Added

  • 819 new corpus entries (Rounds 21-37 + 20 shadow pathological)
  • 15,106 total entries, 97.5/100 A+, 0 failures

Install

cargo install bashrs --version 6.62.0

v6.61.0 — 2 P0 Transpiler Fixes + 14,712 Corpus Entries

10 Feb 10:41

Choose a tag to compare

Highlights

Transpiler Bug Fixes (P0)

Two critical correctness bugs fixed in the Rust-to-Shell transpiler:

  1. Return-in-loop: return expr inside while/for/match bodies within functions was emitting debug format strings (Arithmetic { op: Add, ... }) instead of shell arithmetic ($((expr))). Root cause: loop/match bodies were not propagating function-context awareness for return handling.

  2. Match-in-let: let x = match y { 0 => a, 1 => b, _ => c } was producing x='unknown' instead of a proper case statement with per-arm assignments. Root cause: the parser represents match-as-expression as Expr::Block([Stmt::Match{...}]), which had no handler in convert_expr_to_value.

Both bugs were silent — the transpiler succeeded but generated incorrect shell code.

Corpus Expansion

  • 14,712 total entries (13,397 Bash + 695 Makefile + 620 Dockerfile)
  • V2 Score: 97.5/100 (A+), 0 failures
  • 107+ CLI subcommands for corpus analysis, quality gates, and convergence tracking

New Example

cargo run --example transpiler_demo — 7 self-verifying demonstrations:

  • Basic functions with return values
  • Nested function calls: f(g(h(x)))
  • Match expressions in let bindings
  • While loops with early return
  • Match inside loops (combined pattern)
  • Recursive functions (fibonacci)
  • Multi-function programs (gcd/lcm)

Documentation

  • New Transpiler chapter in The Rash Book (overview + corpus testing)
  • Updated README with current quality metrics
  • Updated book version references

Quality

Metric Value
Tests 10,888 passing (100%)
V2 Corpus Score 97.5/100 (A+)
Corpus Entries 14,712 (0 failures)
Transpilation 100% pass rate
Deterministic 100%
Cross-shell (sh+dash) 98.8%

Install

```bash
cargo install bashrs
```

v6.60.0 - Corpus Expansion & CLI Test Coverage

06 Feb 23:05

Choose a tag to compare

Summary

  • 500+ transpilation corpus entries across all 5 tiers (Bash, Makefile, Dockerfile) — 100% pass rate, Grade A+
  • 114 new CLI command tests for score, coverage, and analysis commands
  • 5 bug fixes: format! macro (bug #8), assignment expression (B-016), arithmetic CommandSubst, and 3 Tier 4 adversarial bugs
  • 3x faster coverage analysis via single-profraw rewrite
  • Refactored constant folding to reduce cognitive complexity

Quality

Metric Value
Tests 10,016 passed (0 failed)
Line Coverage 91.23%
Function Coverage 95.07%
PMAT Score 152.5/159 (95.9%, Grade A+)
Corpus 500+ entries, 100% pass rate

Install

cargo install bashrs --version 6.60.0

Crates

v6.57.0 - DSL exec() Fix & Documentation

20 Jan 11:13

Choose a tag to compare

Highlights

Bug Fixes

  • Issue #95: Fixed exec() string validation false positives

    • exec("cmd1 | cmd2") now compiles successfully
    • Shell operators (|, &&, ||, ;) allowed in exec() arguments
    • Shellshock and command substitution protection still active
  • Issue #95 (part 2): Fixed exec() transpilation

    • Now emits eval 'command' instead of exec 'command'
    • Properly handles pipes and shell operators at runtime

Documentation

  • Added DSL built-in functions reference (book/src/reference/dsl-builtins.md)
  • Documented echo() and exec() usage patterns
  • Added version history for DSL changes

Quality

  • 91.76% line coverage (85% minimum)
  • 95.36% region coverage
  • All examples pass
  • Book tests pass

Upgrade

cargo install bashrs --version 6.57.0

Full Changelog

  • fix(validation): context-aware exec() string validation (Refs #95)
  • fix(ir): exec() uses eval for proper shell operator handling (Refs #95)
  • docs(book): add DSL built-in functions reference

v6.56.0

18 Jan 18:07

Choose a tag to compare

v6.56.0 - Issue Triage Release

Closes 15 GitHub issues with verified fixes:

- **#125**: SC2062 now skips SSH remote command strings
- **#97**: SEC010 recognizes custom validation functions
- **#96**: Heredoc quoted delimiters, find -name patterns
- **#95**: SC2154 with sourced files
- **#93**: Inline if/then/else/fi, SC2031/SC2125/SC2317
- **#118**: MAKE003 quoted context
- **#103**: Parser array syntax (local arr=(), arr+=(), >&2, &>/dev/null)
- **#102**: SC2128/SC2199 local scalar false positives

- **#94**: Rust→Shell transpilation deferred to v3.0+

Full test suite passes (9,872 tests)

v6.55.0 - Fix SC2128, SC2031, SC2154 False Positives

18 Jan 09:50

Choose a tag to compare

What's Changed

This release fixes several false positive issues reported in Issue #132.

Fixed

  • SC2128 False Positives: No longer flags scalar variables ending in 's' (e.g., cpu_tps, status, formats) as arrays. Now tracks actual array declarations (var=(...)) instead of using heuristics.

  • SC2031 False Positives: Fixed multiple false positive scenarios:

    • Array declarations var=(...) no longer detected as subshells
    • Arithmetic grouping $(( (a - b) / c )) no longer detected as subshells
    • Parentheses inside quotes (e.g., regex (?=...)) no longer detected as subshells
  • SC2154 False Positives: Variables with parameter expansion operators (${VAR:-}, ${VAR:=}, ${VAR:+}, ${VAR:?}) no longer flagged as undefined.

Quality

  • All fixes include comprehensive test coverage with property-based tests
  • Validated against real-world benchmark scripts

Installation

cargo install bashrs

Full Changelog

v6.54.0...v6.55.0

Issue Reference

Closes #132