fix(shim): 优化配置解析、跨平台编码与 UAC 提权逻辑

- 使用 `OsString`/`PathBuf` 替代 `String`,实现跨平台无损编码与命令行参数透传
- 完善 `FromLua` 转换与边界校验,拦截空洞 (`nil`) 及非整数键
- 修复环境变量拼接时由于内置分隔符导致的 `join_paths` 报错
- 优化 Windows 下 UAC 提权执行逻辑,改用宽字符 API (`ShellExecuteExW`)
This commit is contained in:
2026-08-18 11:15:30 +08:00
parent 5e69a6a980
commit e3cb065b35
7 changed files with 370 additions and 90 deletions

View File

@@ -2,7 +2,7 @@
name = "rshim"
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
rust-version = "1.94"
license = "MIT OR Unlicense"
description = "A fast, safe Rust shim launcher for Scoop"
@@ -29,3 +29,4 @@ dunce = "1.0.5"
tracing = "0.1.44"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
encoding_rs = "0.8.35"