feat(env): 支持环境变量数组跨平台自动拼接

- 支持在 Lua 中配置数组格式的环境变量(如 PATH),由 Rust 按 OS 自动使用 `;` 或 `:` 拼接
- 保持普通字符串格式环境变量的直接覆盖逻辑
- 新增 `ShimConfig::to_command()` 用于快速创建 Command 对象
- 新增 error.rs 明确错误类型
- 新增 build.rs 优化编译
This commit is contained in:
2026-08-13 20:11:55 +08:00
parent 4aa619f07e
commit e52ba67d7e
7 changed files with 356 additions and 126 deletions

21
Cargo.lock generated
View File

@@ -201,6 +201,7 @@ version = "0.1.0"
dependencies = [
"fs-err",
"mlua",
"thiserror",
"unicode-bom",
"winapi",
]
@@ -260,6 +261,26 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "2.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-bom"
version = "2.0.3"