mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-28 16:41:52 +08:00
feat: 添加 RustDesk 协议支持和项目文档
- 新增 RustDesk 模块,支持与 RustDesk 客户端连接 - 实现会合服务器协议和 P2P 连接 - 支持 NaCl 加密和密钥交换 - 添加视频帧和 HID 事件适配器 - 添加 Protobuf 协议定义 (message.proto, rendezvous.proto) - 新增完整项目文档 - 各功能模块文档 (video, hid, msd, otg, webrtc 等) - hwcodec 和 RustDesk 协议技术报告 - 系统架构和技术栈文档 - 更新 Web 前端 RustDesk 配置界面和 API
This commit is contained in:
18
build.rs
18
build.rs
@@ -14,8 +14,26 @@ fn main() {
|
||||
|
||||
println!("cargo:rustc-env=BUILD_DATE={}", build_date);
|
||||
|
||||
// Compile protobuf files for RustDesk protocol
|
||||
compile_protos();
|
||||
|
||||
// Rerun if the script itself changes
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=protos/rendezvous.proto");
|
||||
println!("cargo:rerun-if-changed=protos/message.proto");
|
||||
}
|
||||
|
||||
/// Compile protobuf files using prost-build
|
||||
fn compile_protos() {
|
||||
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||
|
||||
prost_build::Config::new()
|
||||
.out_dir(&out_dir)
|
||||
.compile_protos(
|
||||
&["protos/rendezvous.proto", "protos/message.proto"],
|
||||
&["protos/"],
|
||||
)
|
||||
.expect("Failed to compile protobuf files");
|
||||
}
|
||||
|
||||
/// Convert days since Unix epoch to year-month-day
|
||||
|
||||
Reference in New Issue
Block a user