【C++】一次rustdesk-server编译记录

RustDesk Server 是一个开源的远程桌面解决方案,允许用户自托管自己的远程桌面服务器。该项目是免费且开源的,支持多种平台和环境。RustDesk Server 提供了 ID/Rendezvous 服务器和 Relay 服务器,以及一些 CLI 工具,方便用户进行远程管理和控制。

安装依赖

首先,确保你的系统已经安装了 cargo 和 rust。

克隆项目

克隆 RustDesk Server 项目到本地:

git clone https://github.com/rustdesk/rustdesk-server.git
cd rustdesk-server

构建项目

使用 cargo 构建项目:

cargo build --release

构建完成后,会在 target/release 目录下生成三个可执行文件:

hbbs.exe - RustDesk ID/Rendezvous 服务器
hbbr.exe - RustDesk Relay 服务器
rustdesk-utils.exe - RustDesk CLI 工具

启动服务器

运行以下命令启动服务器:

./target/release/hbbs
./target/release/hbbr

编译log:

E:\1github_pro\rustdesk\rustdesk-server>cargo build --release
    Updating crates.io index
    Updating git repository `https://github.com/open-trade/confy`
    Updating git repository `https://github.com/open-trade/tokio-socks`
    Updating git repository `https://github.com/open-trade/async-speed-limit`
  Downloaded cfg-if v1.0.0
  Downloaded instant v0.1.12
  ...
  Downloaded rand v0.8.5
warning: spurious network error (3 tries remaining): [28] Timeout was reached (download of `regex-syntax v0.6.25` failed to transfer more than 10 bytes in 30s)
warning: spurious network error (3 tries remaining): [28] Timeout was reached (failed to download any data for `regex v1.5.5` within 30s)
  Downloaded tower v0.4.12
  ...
  Downloaded regex-syntax v0.6.25
warning: spurious network error (3 tries remaining): [92] Stream error in the HTTP/2 framing layer (HTTP/2 stream 61 was not closed cleanly: PROTOCOL_ERROR (err 1))
  Downloaded tokio v1.20.0
  Downloaded windows_x86_64_msvc v0.36.1
  Downloaded windows_x86_64_msvc v0.48.0
  Downloaded zstd-sys v1.6.2+zstd.1.5.1
warning: spurious network error (3 tries remaining): [92] Stream error in the HTTP/2 framing layer (HTTP/2 stream 19 was not closed cleanly: PROTOCOL_ERROR (err 1))
warning: spurious network error (3 tries remaining): [92] Stream error in the HTTP/2 framing layer (HTTP/2 stream 177 was not closed cleanly: PROTOCOL_ERROR (err 1))
  Downloaded winapi v0.3.9
  Downloaded sodiumoxide v0.2.7
   ...
   Compiling hbb_common v0.1.0 (E:\1github_pro\rustdesk\rustdesk-server\libs\hbb_common)
   Compiling axum v0.5.5
   Compiling sqlx-macros v0.6.0
   Compiling sqlx v0.6.0
   Compiling hbbs v1.1.11-1 (E:\1github_pro\rustdesk\rustdesk-server)
warning: fields `id`, `user`, and `status` are never read
  --> src\database.rs:41:9
   |
39 | pub struct Peer {
   |            ---- fields in this struct
40 |     pub guid: Vec<u8>,
41 |     pub id: String,
   |         ^^
...
44 |     pub user: Option<Vec<u8>>,
   |         ^^^^
45 |     pub info: String,
46 |     pub status: Option<i64>,
   |         ^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `hbbs` (lib) generated 1 warning
    Finished `release` profile [optimized] target(s) in 26m 56s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v5.1.2
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

E:\1github_pro\rustdesk\rustdesk-server>

编译结果:

输出结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

奋斗羊羊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值