mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-28 08:31:52 +08:00
refactor: 升级依赖版本并优化构建系统
- 升级核心依赖 (axum 0.8, tower-http 0.6, alsa 0.11 等) - 简化交叉编译配置,切换至 Debian 11 提高兼容性 - 新增 Debian 包打包支持 (debuerreotype 模板) - 移除独立的 mjpeg 解码器,简化视频模块 - 静态链接 libx264/libx265/libopus 到二进制
This commit is contained in:
47
Cargo.toml
47
Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["SilentWind"]
|
||||
description = "A open and lightweight IP-KVM solution written in Rust"
|
||||
license = "GPL-3.0"
|
||||
license = "GPL-2.0"
|
||||
repository = "https://github.com/mofeng-git/One-KVM"
|
||||
keywords = ["kvm", "ipkvm", "remote-management", "embedded"]
|
||||
categories = ["embedded", "network-programming"]
|
||||
@@ -15,9 +15,9 @@ tokio = { version = "1", features = ["full"] }
|
||||
tokio-util = { version = "0.7", features = ["rt"] }
|
||||
|
||||
# Web framework
|
||||
axum = { version = "0.7", features = ["ws", "multipart", "tokio"] }
|
||||
axum-extra = { version = "0.9", features = ["typed-header", "cookie"] }
|
||||
tower-http = { version = "0.5", features = ["fs", "cors", "trace", "compression-gzip"] }
|
||||
axum = { version = "0.8", features = ["ws", "multipart", "tokio"] }
|
||||
axum-extra = { version = "0.12", features = ["typed-header", "cookie"] }
|
||||
tower-http = { version = "0.6", features = ["fs", "cors", "trace", "compression-gzip"] }
|
||||
|
||||
# Database - Use bundled SQLite for static linking
|
||||
sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] }
|
||||
@@ -31,22 +31,22 @@ tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
||||
|
||||
# Error handling
|
||||
thiserror = "1"
|
||||
thiserror = "2"
|
||||
anyhow = "1"
|
||||
|
||||
# Authentication
|
||||
argon2 = "0.5"
|
||||
rand = "0.8"
|
||||
rand = "0.9"
|
||||
|
||||
# Utilities
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
base64 = "0.22"
|
||||
nix = { version = "0.29", features = ["fs", "net", "hostname", "poll"] }
|
||||
nix = { version = "0.30", features = ["fs", "net", "hostname", "poll"] }
|
||||
|
||||
# HTTP client (for URL downloads)
|
||||
# Use rustls-tls by default, but allow native-tls for systems with older GLIBC
|
||||
reqwest = { version = "0.12", features = ["stream", "rustls-tls"], default-features = false }
|
||||
# Use rustls by default, but allow native-tls for systems with older GLIBC
|
||||
reqwest = { version = "0.13", features = ["stream", "rustls"], default-features = false }
|
||||
urlencoding = "2"
|
||||
|
||||
# Static file embedding
|
||||
@@ -55,10 +55,8 @@ mime_guess = "2"
|
||||
|
||||
# TLS/HTTPS
|
||||
rustls = { version = "0.23", features = ["ring"] }
|
||||
rustls-pemfile = "2"
|
||||
tokio-rustls = { version = "0.26", features = ["ring"] }
|
||||
rcgen = "0.13"
|
||||
axum-server = { version = "0.7", features = ["tls-rustls"] }
|
||||
rcgen = "0.14"
|
||||
axum-server = { version = "0.8", features = ["tls-rustls"] }
|
||||
|
||||
# CLI argument parsing
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
@@ -70,11 +68,11 @@ time = "0.3"
|
||||
v4l = "0.14"
|
||||
|
||||
# JPEG encoding (libjpeg-turbo, SIMD accelerated)
|
||||
turbojpeg = "1.1"
|
||||
turbojpeg = "1.3"
|
||||
|
||||
# Bytes handling
|
||||
bytes = "1"
|
||||
bytemuck = { version = "1.14", features = ["derive"] }
|
||||
bytemuck = { version = "1.24", features = ["derive"] }
|
||||
|
||||
# Frame deduplication (hash-based comparison)
|
||||
xxhash-rust = { version = "0.8", features = ["xxh64"] }
|
||||
@@ -84,11 +82,11 @@ async-stream = "0.3"
|
||||
futures = "0.3"
|
||||
|
||||
# WebSocket client (for ttyd proxy)
|
||||
tokio-tungstenite = "0.24"
|
||||
tokio-tungstenite = "0.28"
|
||||
|
||||
# High-performance synchronization
|
||||
parking_lot = "0.12"
|
||||
arc-swap = "1.7"
|
||||
arc-swap = "1.8"
|
||||
|
||||
# WebRTC
|
||||
webrtc = "0.14"
|
||||
@@ -96,7 +94,7 @@ rtp = "0.14"
|
||||
|
||||
# Audio (ALSA capture + Opus encoding)
|
||||
# Note: audiopus links to libopus.so (unavoidable for audio support)
|
||||
alsa = "0.9"
|
||||
alsa = "0.11"
|
||||
audiopus = "0.2"
|
||||
|
||||
# HID (serial port for CH9329)
|
||||
@@ -114,7 +112,7 @@ gpio-cdev = "0.6"
|
||||
hwcodec = { path = "libs/hwcodec" }
|
||||
|
||||
# RustDesk protocol support
|
||||
protobuf = { version = "3.4", features = ["with-bytes"] }
|
||||
protobuf = { version = "3.7", features = ["with-bytes"] }
|
||||
sodiumoxide = "0.2"
|
||||
sha2 = "0.10"
|
||||
|
||||
@@ -129,8 +127,8 @@ tokio-test = "0.4"
|
||||
tempfile = "3"
|
||||
|
||||
[build-dependencies]
|
||||
protobuf-codegen = "3.4"
|
||||
toml = "0.8"
|
||||
protobuf-codegen = "3.7"
|
||||
toml = "0.9"
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
@@ -142,9 +140,4 @@ panic = "abort"
|
||||
# Static linking profile for musl targets
|
||||
[profile.release-static]
|
||||
inherits = "release"
|
||||
opt-level = "z" # Optimize for size
|
||||
|
||||
# Cross-compilation targets
|
||||
# aarch64-unknown-linux-gnu (ARM64) - Primary target
|
||||
# armv7-unknown-linux-gnueabihf (ARMv7)
|
||||
# x86_64-unknown-linux-gnu (x86_64)
|
||||
opt-level = "z" # Optimize for size
|
||||
Reference in New Issue
Block a user