mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-12 03:33:59 +00:00
hbb_common is shared with the server, but `fs`, `platform`, `keyboard`, `message.proto` and most of `config::keys` are reached only from the client. Keeping them here means every change to them costs a submodule round-trip. They move to the new `base` crate in the rustdesk tree. What stays is what the server actually names: `rendezvous.proto`, the socket/stream layer, the `Config` core, and the 32 option keys this crate reads itself. Those 32 are re-exported from `base::config::keys`, so callers still see one set. `IdPk` moves from message.proto to rendezvous.proto. It is register-pk handshake business, the server is its only other user, and the field numbers are unchanged so the wire format is identical. `config::patch()` resolves a home directory through the shell lookup that lived in `platform::linux`, so `find_cmd_path`, `CMD_*` and `run_cmds_trim_newline` stay behind in a new `sh` module. `base::platform::linux` re-exports them, leaving every existing `platform::linux::CMD_SH` path working. backtrace, filetime, osascript, smithay-client-toolkit and winapi go with the code that used them, so the server no longer builds a Wayland client toolkit and a Windows API crate it never calls. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
15 lines
418 B
Rust
15 lines
418 B
Rust
fn main() {
|
|
let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
|
|
|
|
std::fs::create_dir_all(&out_dir).unwrap();
|
|
|
|
protobuf_codegen::Codegen::new()
|
|
.pure()
|
|
.out_dir(out_dir)
|
|
.inputs(["protos/rendezvous.proto"])
|
|
.include("protos")
|
|
.customize(protobuf_codegen::Customize::default().tokio_bytes(true))
|
|
.run()
|
|
.expect("Codegen failed.");
|
|
}
|