rexxw: bootstrapping wrapper for rexxfile projects #18

Open
opened 2026-02-11 23:51:04 +00:00 by navicore · 0 comments
navicore commented 2026-02-11 23:51:04 +00:00 (Migrated from github.com)

Summary

A rexxw wrapper script (analogous to Gradle's gradlew) that projects can vendor so that ./rexxfile build works without requiring rexx to be pre-installed.

Motivation

A rexxfile is a shebang-executable REXX script that serves as a task runner (like justfile or Makefile). The problem: #!/usr/bin/env rexx requires the interpreter to already be installed. This is a bootstrapping problem — especially for patch-rexx itself, where you can't use rexx to build rexx.

Gradle solved this elegantly with gradlew — a small shell script checked into the project that downloads/installs the build tool on first run. A rexxw wrapper would do the same for REXX-based task runners.

Proposed Design

A rexxw shell script that:

  1. Checks if rexx is already available in $PATH
  2. If not, bootstraps it via one of:
    • Downloading a prebuilt binary from GitHub releases (preferred for speed)
    • Building from source with cargo install patch-rexx (fallback, requires Rust toolchain)
    • Using a project-local cached binary (e.g., .rexx/bin/rexx)
  3. Delegates to the installed rexx interpreter, forwarding all arguments to the rexxfile

Usage

Projects would vendor rexxw alongside their rexxfile:

my-project/
  rexxw          # bootstrapping wrapper (checked in)
  rexxfile       # REXX task runner (checked in)
  src/
  ...
./rexxw build    # installs rexx if needed, then runs: rexx ./rexxfile build
./rexxw test
./rexxw ci

Prerequisites

  • GitHub releases with prebuilt binaries for common platforms (macOS arm64/x86_64, Linux x86_64/aarch64)
  • Version pinning strategy (e.g., .rexx-version file or a variable in rexxw)

Open Questions

  • Should rexxw be a POSIX shell script, or also provide a .bat/PowerShell variant for Windows?
  • Where should the cached binary live? ~/.rexx/bin/ (user-global) vs .rexx/bin/ (project-local)?
  • How to handle version upgrades — check on every run or only when .rexx-version changes?
  • Should rexxw itself be generated by a rexx init command?
## Summary A `rexxw` wrapper script (analogous to Gradle's `gradlew`) that projects can vendor so that `./rexxfile build` works without requiring `rexx` to be pre-installed. ## Motivation A `rexxfile` is a shebang-executable REXX script that serves as a task runner (like `justfile` or `Makefile`). The problem: `#!/usr/bin/env rexx` requires the interpreter to already be installed. This is a bootstrapping problem — especially for patch-rexx itself, where you can't use `rexx` to build `rexx`. Gradle solved this elegantly with `gradlew` — a small shell script checked into the project that downloads/installs the build tool on first run. A `rexxw` wrapper would do the same for REXX-based task runners. ## Proposed Design A `rexxw` shell script that: 1. **Checks** if `rexx` is already available in `$PATH` 2. **If not**, bootstraps it via one of: - Downloading a prebuilt binary from GitHub releases (preferred for speed) - Building from source with `cargo install patch-rexx` (fallback, requires Rust toolchain) - Using a project-local cached binary (e.g., `.rexx/bin/rexx`) 3. **Delegates** to the installed `rexx` interpreter, forwarding all arguments to the `rexxfile` ### Usage Projects would vendor `rexxw` alongside their `rexxfile`: ``` my-project/ rexxw # bootstrapping wrapper (checked in) rexxfile # REXX task runner (checked in) src/ ... ``` ```bash ./rexxw build # installs rexx if needed, then runs: rexx ./rexxfile build ./rexxw test ./rexxw ci ``` ## Prerequisites - GitHub releases with prebuilt binaries for common platforms (macOS arm64/x86_64, Linux x86_64/aarch64) - Version pinning strategy (e.g., `.rexx-version` file or a variable in `rexxw`) ## Open Questions - Should `rexxw` be a POSIX shell script, or also provide a `.bat`/PowerShell variant for Windows? - Where should the cached binary live? `~/.rexx/bin/` (user-global) vs `.rexx/bin/` (project-local)? - How to handle version upgrades — check on every run or only when `.rexx-version` changes? - Should `rexxw` itself be generated by a `rexx init` command?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/patch-rexx#18
No description provided.