Repository navigation
STS-X v0.2.1 — Windows 分发质量升级(MSVC 静态 CRT)
STS-X v0.2.1 — Windows 分发质量升级
核心变更
- Windows 构建从 MinGW 切换到 MSVC(cargo-xwin 交叉编译),并在
.cargo/config.toml启用+crt-static静态链接 CRT。 - 效果:生成的
sts-x.exe是真正的单文件零依赖——不再要求用户机器安装VCRUNTIME140.dll(Visual C++ 运行库),双击即跑,兼容所有 Windows 10/11 x86_64。 - macOS 二进制(
sts-x)同步用当前 v0.2.1 源码重新构建(release + LTO + strip)。 - 修复交叉编译图标嵌入:
build.rs在 macOS 主机用cargo-xwin编译 Windows 时,embed-resource经llvm-rc处理.rc导致相对图标路径失效;改为基于CARGO_MANIFEST_DIR的绝对路径后,Windows exe 正常嵌入图标。
平台支持
| 平台 | 资产 | 架构 | 依赖 |
|---|---|---|---|
| macOS | sts-x |
aarch64 (Apple Silicon) | 零(系统 libSystem) |
| Windows | sts-x.exe |
x86_64 | 零(静态 CRT,无需 VC++ 运行库) |
注:Windows 为 x86_64 构建,可在所有 64 位 Windows 运行;Intel Mac 与 Linux 版本计划中。
下载与安装
# macOS (Apple Silicon)
curl -L https://github.com/cscb603/sts-x/releases/latest/download/sts-x -o sts-x
chmod +x sts-x && sudo mv sts-x /usr/local/bin/
# Windows (PowerShell, 管理员可选)
curl -L https://github.com/cscb603/sts-x/releases/latest/download/sts-x.exe -o sts-x.exe
.\sts-x.exe search "your query"若 macOS 首次运行被拦截(未公证):
xattr -dr com.apple.quarantine /usr/local/bin/sts-x用法速览
sts-x index ~/your-project # 建索引(一次性,自动缓存)
sts-x search "select_best_cfg" # AST 切块 + BM25,返回结构化 JSON
sts-x search "config" -f # 仅搜文件名
sts-x search "auth" -H # 人类友好模式
sts-x serve # 启动 MCP HTTP 服务(127.0.0.1:9876)技术规格
- 二进制大小:~17MB(strip 后)
- 搜索延迟:0–2ms(千级文件)
- 索引:Tantivy BM25 + tree-sitter AST 切块(9 语言)
- 默认输出:AI 原生结构化 JSON,内置 MCP 服务
- 许可证:MIT
校验
- macOS:
file sts-x→ Mach-O 64-bit executable arm64 - Windows:
file sts-x.exe→ PE32+ executable (GUI) Intel 80386(实际 x86_64),静态链接