-
安装Rust:
- 使用curl安装Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- 确保Rust安装成功,可以运行
rustc --version检查版本。
- 使用curl安装Rust:
-
安装Kitsunebi的依赖:
- 打开或创建
Cargo.toml文件。 - 添加必要的依赖:
[dependencies] kitsunebi = ".6." hyper = ".9" tokio = "1." serde = { version = "1.", features = ["derive"] }
- 打开或创建
-
克隆Kitsunebi仓库:
- 运行以下命令克隆仓库:
git clone https://github.com/Kitsunebi/Kitsunebi.git
- 进入仓库目录:
cd Kitsunebi
- 运行以下命令克隆仓库:
-
配置
Cargo.toml:- 确保
Cargo.toml中的[workspace]部分包含所有模块路径:[workspace] members = [ "client", "core", "file", "server", "transfer", "types" ]
- 确保
-
编译Kitsunebi:
- 在仓库根目录运行:
cargo build
- 在仓库根目录运行:
-
运行Kitsunebi:
- 运行传输脚本:
cargo run --release examples/transfer main
- 或者在主命令行运行:
cargo run --release
- 运行传输脚本:
-
测试传输功能:
- 使用提供的脚本发送文件并验证接收。
- 修改
config.json以设置服务器地址和端口。
注意事项:
- 确保Rust和依赖版本与Kitsunebi兼容。
- 可能需要从存储库更新或重新编译以解决兼容性问题。
完成以上步骤后,您应该能够成功安装并运行Kitsunebi,开始快速文件传输。
