One tiny native Windows binary that pretends to be many. Copy or hardlink it to
<name>.exe, drop a <name>.shim next to it, and the shim execs the real
target with the configured args plus whatever the user passed.
This is the same idea Scoop's shim
and busybox use. Taurio uses it so things like php,
composer, mysql, git show up as real .exe files that where.exe,
Node's child_process.spawn, Python's subprocess, Git Bash, and Go's
exec.Command all find natively – which .bat shims can't do.
- Reads its own filename via
current_exe()and lowercases the stem (e.g.php). - If the stem is
phporcomposer, runs Taurio's project-aware PHP runtime resolver internally – walks up looking for.taurio.json, then reads%APPDATA%\Taurio\taurio.jsonto pick the runtime. - Otherwise reads the sibling
<stem>.shimfile:path = "C:\Taurio\bin\mysql\bin\mysql.exe" args = "--defaults-file=C:\Taurio\etc\mysql\my.ini"
- Execs
pathwithargs+ the user's argv, propagates the exit code.
#-prefixed lines and blank lines are ignored. args may quote tokens with
spaces using double quotes.
Download taurio-shim.exe from the latest release
and copy it once per shim name:
Copy-Item taurio-shim.exe C:\Taurio\shims\php.exe
Copy-Item taurio-shim.exe C:\Taurio\shims\composer.exe
Copy-Item taurio-shim.exe C:\Taurio\shims\mysql.exe
Set-Content C:\Taurio\shims\mysql.shim @'
path = "C:\Taurio\bin\mysql\bin\mysql.exe"
args = ""
'@php and composer need no .shim file – they resolve via Taurio's config.
Requires Rust (stable). Output is one statically linked ~270 KB binary.
cargo build --release
# target\release\taurio-shim.exeRelease builds are produced automatically by GitHub Actions on v* tag push.
MIT – see LICENSE.