3db8945e16b5c702d817fe953011325c8a0f4eb9
- 新增 Lua 动态配置 tools 目录并返回完整路径 - 将 `resolve_args` 和 `to_command` 改为接受泛型 `IntoIterator`,解耦参数来源 - 统一使用 `chain` 零拷贝合并预设参数与运行时参数,消除多余堆分配 - 提权回退分支改为直接复用 `cmd.get_args()`,修复提权时 `mr:` 别名未展开的缺陷 - 规范参数与变量命名,完善代码注释
rshim
rshim is the shim program written in rust.
Why this exist?
There are several versions of shim:
-
the official
shim.cswas written in c# and required an instantiation of a .NET command line app every time it was started therefore is slower than directly executing. And it dose not handle Ctrl+C event correctly. -
shim.cis ok with performance and Ctrl+C event handling,but sometimes suffer memory violation (randomly exited with return code3221226356). -
shim.cppdidn't work on my machine, calling it with any executable result in an infinite recursion of creating subprocess until eating all memory for unknown subtle reason.
rshim :
- less probability with bug and undefined behavior.
- properly handle variety errors.
- friendly error message.
- properly handle Ctrl+C events.
- properly handle utf-8 with or without bom in shim file.
Installation
First install rust
cargo build --release
Close any running process with existed shim. then
./repshims.bat
Executable Size
Without crt-static enabled: around 200kb
With crt-static enabled: around 300kb
Description
Languages
Rust
95.1%
Batchfile
4.9%