The workspace pinned `ring` everywhere because aws-lc-sys 0.41.0 failed to C-compile on the Windows CI runner. Re-tested on that runner (.133) with aws-lc-sys 0.44.0: the `params.c` cl.exe failure does not reproduce under MSVC 14.44, and rustls's `aws_lc_rs` feature turns on `aws-lc-rs/prebuilt-nasm`, so no NASM is needed on the box either. That unblocks post-quantum TLS: `prefer-post-quantum` offers X25519MLKEM768 first on every TLS 1.3 handshake (mgmt API, native control plane, QUIC), which ring cannot do — it has no ML-KEM. Classical curves stay in the list, so older clients still connect. rustls, quinn, rcgen and tokio-rustls each select a backend independently, so all four had to move together; a single dissenter pulls a second crypto stack in via feature unification. The direct `ring` users (ed25519 in pf-update-check, SHA-256 in the Windows updater) moved to aws-lc-rs, whose API is ring-compatible. `ring` does NOT leave the tree: ureq 2 names `features = ["ring"]` in its own rustls dependency line and cargo features are additive, so no dependent can switch it off. Two backends compiled in means rustls refuses to infer one, and anything built via `ClientConfig::builder()` panics instead of picking — which is what ureq's default agent does on its first HTTPS request. `tls::install_default_provider()` makes the choice explicit; it runs at each binary's entry point and defensively in pf-client-core, which several binaries link. Dropping ring entirely needs the ureq 2 -> 3 upgrade (36 call sites), deliberately left out of this change. Verified on macOS: pf-update-check 32, punktfunk-core 385, c_abi 1 (the last with LIBRARY_PATH=/opt/homebrew/opt/opus/lib) — aws-lc-sys links into the C ABI harness, so the Swift/Kotlin embedders keep working. cargo fmt --all --check clean.
47 lines
1.7 KiB
Rust
47 lines
1.7 KiB
Rust
//! `punktfunk-client` — the native Linux punktfunk/1 desktop shell (relm4/libadwaita).
|
|
//!
|
|
//! Hosts, pairing/trust, settings, and the desktop library page; every stream (and the
|
|
//! console game library) runs in the spawned `punktfunk-session` Vulkan binary — the
|
|
//! shell never touches video (punktfunk-planning `linux-client-rearchitecture.md`).
|
|
// `deny`, not `forbid`, since edition 2024: clearing Steam's SDL device filter and the spawn
|
|
// test's `HOME` scoping mutate the process env, which is now an unsafe call. Both carry a named
|
|
// `#[allow(unsafe_code)]` with the proof at the site; everything else stays compiler-refused.
|
|
#![deny(unsafe_code)]
|
|
|
|
// The UI-agnostic plumbing lives in `pf-client-core`, shared with the session binary.
|
|
// Root re-exports keep every `crate::trust`-style path resolving unchanged.
|
|
#[cfg(target_os = "linux")]
|
|
pub use pf_client_core::{discovery, gamepad, library, os, trust, video, wol};
|
|
|
|
#[cfg(target_os = "linux")]
|
|
mod app;
|
|
#[cfg(target_os = "linux")]
|
|
mod cli;
|
|
// "Create shortcut…" — the desktop-entry writer (design/client-deep-links.md §5).
|
|
#[cfg(target_os = "linux")]
|
|
mod shortcuts;
|
|
#[cfg(target_os = "linux")]
|
|
mod spawn;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_hosts;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_library;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_settings;
|
|
#[cfg(target_os = "linux")]
|
|
mod ui_trust;
|
|
|
|
#[cfg(target_os = "linux")]
|
|
fn main() -> gtk::glib::ExitCode {
|
|
punktfunk_core::tls::install_default_provider();
|
|
app::run()
|
|
}
|
|
|
|
/// GTK4/SDL3 are Linux turf; this stub keeps `cargo build --workspace` green on macOS
|
|
/// (the Mac client lives in clients/apple).
|
|
#[cfg(not(target_os = "linux"))]
|
|
fn main() {
|
|
eprintln!("punktfunk-client is Linux-only — the macOS client lives in clients/apple");
|
|
std::process::exit(2);
|
|
}
|