chore: 初始化 Cargo 项目骨架与构建验证

工具链:rustup + stable-x86_64-pc-windows-gnu + MinGW gcc 链接器

包含内容:
- Cargo.toml(edition 2024,name=matrix-music-bot)
- Cargo.lock(dev profile 验证通过)
- src/main.rs(hello world 占位,已 cargo build 通过)
- .cargo/config.toml(项目级 cargo 配置,指定 MinGW gcc 为链接器)
- .gitignore 增补:排除项目根的 plan 副本(正式版在 ~/.claude/plans/)

构建验证:cargo build 在 MinGW gcc 链接器下成功完成(1.56s)

后续 M1.2 将添加:clap(CLI 解析)+ serde/toml(配置文件)+ thiserror/anyhow
+ tracing(日志)+ tokio(async)+ matrix-sdk(含 E2EE crypto 与 UI timeline)
This commit is contained in:
Matrix Music Bot Dev
2026-07-02 01:25:33 +08:00
parent 5c4b8d8b82
commit 17eb51e215
5 changed files with 40 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
# Project-local cargo config for matrix-music-bot
# Forces MinGW gcc as the C linker (works with rustls + pure-Rust deps)
[target.x86_64-pc-windows-gnu]
linker = "C:/msys64/mingw64/bin/gcc.exe"
ar = "C:/msys64/mingw64/bin/ar.exe"
[build]
# Default target to GNU (avoids accidentally building MSVC)
target = "x86_64-pc-windows-gnu"
[net]
git-fetch-with-cli = true
# Note: 如果在国内且 crates.io 慢,可在 Cargo.toml 用 [patch] / [source.crates-io]
# 替换为镜像,或设置环境变量 CARGO_NET_GIT_FETCH_WITH_CLI=true