构建(开发者)
这篇面向开发者,说明如何从源码构建 Qexed 及相关工具。
环境要求
- Rust stable(建议
rustup安装,当前建议1.91+) - Git
- Windows 下建议
x86_64-pc-windows-msvc
获取源码
git clone https://github.com/qexed/Qexed.git
Set-Location "Qexed"
rustup update stable
构建服务端
cargo build --release --bin qexed
构建完整工作区
cargo build --release --workspace
可执行文件位于 target/release。
构建 WASM 插件示例(可选)
rustup target add wasm32-unknown-unknown
cargo build --manifest-path "plugins/examples/Cargo.toml" --target wasm32-unknown-unknown --release
常用工具
cargo build --release -p qexed_tools --bins
cargo build --release -p qexed_config --bin qexed_config_to_mdx
生成 AutoDoc 文档
配置文档和插件 API 文档都由 qexed_config_to_mdx 生成。官网仓库使用 Next.js app router,插件 API 页面目标目录是 app/docs/plugin-api。
cargo run -p qexed_config --bin qexed_config_to_mdx -- --format next-app --out "target/autodoc-config"
cargo run -p qexed_config --bin qexed_config_to_mdx -- --format json --out "target/autodoc-smoke" --plugin-docs-out "E:/code/qexed-website/app/docs/plugin-api"
开发建议
- 优先使用稳定分支 API 进行插件和配置联调。
- 升级 Rust 或依赖后,先在隔离环境做回归验证。