refactor: 配置文件引擎迁移至 mlua 并优化环境变量注入

- 配置文件解析引擎由 shim 替换为 mlua (Lua 5.4)
- 优化路由策略:统一以根目录 shims.lua 为入口,支持 tools/ 目录模块化降级探测
- 自动注入 __SHIM_DIR__ 绝对路径与 package.path 模块搜索路径
- 环境变量改用 Command::envs 安全注入,并在 UAC 提权时透传
This commit is contained in:
2026-08-12 20:19:50 +08:00
parent 7934dde74d
commit 4aa619f07e
6 changed files with 516 additions and 105 deletions

View File

@@ -2,7 +2,7 @@
name = "rshim"
version = "0.1.0"
authors = ["anonymous <anonymous@example.com>"]
edition = "2018"
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -11,12 +11,10 @@ edition = "2018"
opt-level = "z"
panic = "abort"
[dependencies]
fs-err = "2.5.0"
unicode-bom = "1"
[dependencies.winapi]
version = "0.3"
features = [
fs-err = "3.3.1"
unicode-bom = "2.0.3"
mlua = { version = "0.12.0", features = ["lua54", "vendored"] }
winapi = { version = "0.3", features = [
"wincon",
"consoleapi",
"minwindef",
@@ -28,4 +26,6 @@ features = [
"processthreadsapi",
"objbase",
"impl-default"
]
] }