[package] name = "netdesk-core" version.workspace = true edition.workspace = true authors.workspace = true license.workspace = true description = "NetDesk native remote-desktop core (signaling, E2E crypto, transport, codec). Developed by Akronlogic." [lib] name = "netdesk_core" crate-type = ["lib", "staticlib"] # frb static-links core (rlib); the vestigial netdesk_core cdylib overflowed MinGW export ordinals once webrtc was linked [dependencies] tokio = { workspace = true } tokio-tungstenite = { workspace = true } rustls = { workspace = true } futures-util = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } sha2 = { workspace = true } hmac = { workspace = true } # TOTP (RFC 6238) 2FA on the native host — HMAC-SHA1 over the time counter. sha1 = "0.10" pbkdf2 = { workspace = true } p256 = { workspace = true } aes-gcm = { workspace = true } base64 = { workspace = true } hex = { workspace = true } anyhow = { workspace = true } thiserror = { workspace = true } rand = { workspace = true } openh264 = { workspace = true } tracing = { workspace = true } # Host-engine permission gates + approve flow log through the platform's logger # (env_logger in the Windows host, logcat via android_logger on Android). log = "0.4" # Session recording: repackage the received H.264 into a playable .mp4 (no re-encode). mp4 = "0.14" webrtc = "0.17.2" async-trait = "0.1" bytes = "1" # Windows-only: Media Foundation hardware H.264 decode (DXVA via the system # H264 decoder MFT). Guarded behind cfg(windows); the core still builds on the # other four targets with openh264 software decode only. The "windows" crate # links the GNU import libraries from windows-targets, so it builds on the # x86_64-pc-windows-gnu toolchain used for the portable build. [target.'cfg(windows)'.dependencies] # VP9 software decode (libvpx) for constrained links. Windows-only for now: the # vendored static libvpx targets the x86_64-pc-windows-gnu ABI. netdesk-vpx = { path = "../vpx" } windows = { version = "0.58", features = [ "Win32_Foundation", "Win32_System_Com", "Win32_Media_MediaFoundation", "Win32_Graphics_Direct3D", "Win32_Graphics_Direct3D11", "Win32_Graphics_Dxgi", "Win32_Graphics_Dxgi_Common", ] } # macOS / iOS: VideoToolbox hardware H.264 decode (decode_vt.rs). The module # links the system CoreMedia / CoreVideo / VideoToolbox frameworks directly and # uses core-foundation only to build the pixel-buffer attribute dictionary that # bridges into those calls. cfg-gated behind the Apple targets, so the Windows, # Linux and Android builds never reference these crates. [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] core-foundation = "0.10" core-foundation-sys = "0.8" # Android: MediaCodec hardware H.264 decode (decode_mediacodec.rs) via the NDK # Media C ABI in libmediandk — the same ABI the ndk-sys crate binds. cfg-gated # behind target_os = "android". [target.'cfg(target_os = "android")'.dependencies] ndk-sys = "0.6" # Linux: VAAPI hardware H.264 decode (decode_vaapi.rs) through FFmpeg / # libavcodec. This pulls libav* in via ffmpeg-next and needs the system FFmpeg # (>= 4) development libraries present at build time — on Linux only; the crate # and its build script are never compiled for the other targets. [target.'cfg(target_os = "linux")'.dependencies] ffmpeg-next = "9.0"