Lightweight native Discord client for Windows, Linux and macOS, written in Rust. No Electron, no browser engine.
Notices for crates/voice
Serein
This crate is adapted from Serein at commit
a0e72cc (a0e72cccb0727142b0bbb40bdd6eaa897476c4ca), licensed MIT OR Apache-2.0 and used
here under the MIT license. RustCord's modifications are offered under the same terms.
Every adapted file keeps an attribution header naming its source.
| RustCord file | Adapted from (Serein) | Changes |
|---|---|---|
src/transport.rs |
crates/discord-voice/src/transport.rs (run_inner and helpers) |
No camera or diagnostics; the call's DAVE identity is shared with its Go Live streams and watched-stream audio is mixed in (stream_mix.rs); per-user speaking, roster and ping events; 64 kbit/s voice Opus instead of 510 kbit/s; tolerant endpoint parsing; named close codes; unknown informational text opcodes ignored; explicit ring rustls connector. Robustness beyond Serein: close codes below 4000 (and closes without a code) resume like 4015, WebSocket (re)connects retry with backoff (0.5/2/5 s), UDP discovery probes repeat every second, a stray datagram during discovery is ignored |
src/transport_tests.rs |
crates/discord-voice/src/transport.rs (tests local_voice_exchange, local_voice_peer_disconnect_enters_waiting_without_timeout) |
Adjusted to the audio-only protocol and new events; refused/terminal-close tests added |
src/stream.rs |
crates/discord-voice/src/transport.rs (run_stream_inner, StreamAudio, announce_video, stream_video_packet, decrypt_video, receive_stream_video, VideoWatch, invalidate_stream) |
Go Live send and watch: H.264 only (no H.265/AV1), diagnostics removed, heartbeat round trips reported, capture failures end the stream with their reason, repeated UDP discovery probes; 4 MiB receive / 1 MiB send UDP buffers; transport-wide feedback records every authenticated arrival (also during DAVE transitions); stream statistics |
src/stream_tests.rs |
crates/discord-voice/src/test_stream.rs |
Loopback sender/viewer exchange adapted (RGBA output, statuses); capture-failure test added; the 45 s rekey-timeout variant not ported |
src/screen.rs |
crates/discord-voice/src/screen.rs, crates/client-core/src/screen.rs (Settings) |
Windows only; RustCord quality presets (720p/1080p/1440p/source, 15/30/60 fps) with Discord-like bitrates (4 Mbit/s 720p30 ... 15 at 1440p60, 20 at 4K60); 5 s keyframe interval; demand-driven 1280-wide preview converted in parallel; raw frame buffers recycled; an oversized encoded picture is dropped (next one a keyframe) instead of abandoning the hardware encoder; stream statistics; Serein's pacing, keyframe, bitrate and encoder fallback |
src/screen/capture_windows.rs |
crates/discord-voice/src/screen/capture_windows.rs, screen/capture.rs |
RustCord source IDs; cloaked and desktop windows skipped; buffers reused; one-frame thumbnails; system audio is best effort |
src/screen/audio_windows.rs |
crates/discord-voice/src/screen/audio_windows.rs |
Diagnostics removed; a failed loopback ends only the shared audio |
src/screen/convert.rs |
crates/discord-voice/src/screen/convert.rs |
Direct path for unscaled sources (identical output, no interpolation); up to 8 row bands |
src/video_encode_windows.rs |
crates/discord-voice/src/video_encode_windows.rs, video_encode.rs (Config) |
Screen sharing only (no camera profile or I420 entry point); caller-chosen keyframe interval; half-second rate-control buffer; oversized pictures reported separately |
src/video_decode_windows.rs |
crates/platform/src/video/live_windows.rs, crates/platform/src/video/media_foundation.rs (dxgi_manager, Runtime) |
RustCord's Media Foundation H.264 decoder for watched streams: low-latency mode and worker threads, DXVA through a Direct3D 11 device with a reused staging texture for read-back (Media Foundation's own read-back as fallback), output buffers reused, borrowed NV12 planes instead of copies |
src/video.rs |
crates/discord-voice/src/video.rs |
Unchanged apart from the header |
src/video_sps.rs |
crates/discord-voice/src/video_sps.rs |
Unchanged apart from the header |
src/video_codec.rs |
crates/discord-voice/src/video_codec.rs |
H.264 only |
src/video_receive.rs |
crates/discord-voice/src/video_receive.rs |
H.264 only; Media Foundation (DXVA, then software) with OpenH264 as fallback, decoded to bounded RGBA (downscaled above 2560 wide) with buffer reuse; a decoder is replaced only when it fails (never for queueing), a backlog is decoded without being shown, keyframe requests at least 1 s apart per source; statistics; no diagnostics |
src/video_rgba.rs |
crates/discord-voice/src/video_receive.rs (scale_i420_to_rgba, rgb) |
NV12/I420 to RGBA in parallel row bands (rayon), runtime-selected AVX2 row loop |
src/video_reorder.rs |
crates/discord-voice/src/video_reorder.rs |
Window holds a whole keyframe (2048 packets, 2.5 MiB) during repair |
src/video_playout.rs |
crates/discord-voice/src/video_playout.rs |
H.264 only; discarded-picture count |
src/video_feedback.rs |
crates/discord-voice/src/video_feedback.rs |
Unchanged apart from the header |
src/transport_feedback.rs |
crates/discord-voice/src/transport_feedback.rs |
Unchanged apart from the header |
src/stream_sync.rs |
crates/discord-voice/src/stream_sync.rs |
Unchanged apart from the header |
src/stream_audio_receive.rs |
crates/discord-voice/src/stream_audio_receive.rs |
Unchanged apart from the header |
src/stream_playout.rs |
crates/discord-voice/src/stream_playout.rs |
Diagnostics statistics removed |
src/presentation.rs |
crates/discord-voice/src/presentation.rs |
PlaybackFrame lost its call-mixing helpers (RustCord's speaker queue carries plain PCM; the call reports an estimated playout time instead of device feedback) |
src/crypto.rs |
crates/discord-voice/src/crypto.rs |
H.265/AV1 payload types not accepted; rtp_header helper; RTCP feedback, soundshare and DAVE (Dave) logic unchanged |
src/mixer.rs |
crates/discord-voice/src/mixer.rs |
Unchanged apart from the header |
src/jitter.rs |
crates/discord-voice/src/jitter.rs |
Unchanged apart from the header |
src/activity.rs |
crates/discord-voice/src/activity.rs |
Tests added (from audio::debug_processing_check) |
src/capture.rs |
crates/discord-voice/src/capture.rs |
Unchanged apart from the header |
src/timer.rs |
crates/discord-voice/src/timer.rs |
Unchanged apart from the header |
src/test_mls.rs |
crates/discord-voice/src/test_mls.rs |
Unchanged apart from the header (test-only) |
src/audio.rs |
crates/discord-voice/src/audio.rs, crates/platform/src/audio.rs |
System default devices (followed when they change) or the devices chosen in settings; microphone/speaker volume, RNNoise noise suppression ("Voice Isolation", via nnnoiseless), echo cancellation fed with what the speaker callback played (echo.rs) and a loopback mic test; no preview; fixed -55 dBFS send gate |
src/lib.rs |
Call glue in apps/desktop/src/voice.rs (start_media, status handling), screen.rs, watch.rs and crates/discord-voice/src/lib.rs |
Public API (VoiceHandle, VoiceConfig, VoiceEvent; Go Live: StreamConfig, StreamHandle, WatchHandle, StreamEvent, ScreenSource, StreamQuality, VideoFrame, StreamStats, screen_sources, screen_thumbnail); events are serialized so Disconnected is always last |
vendor/davey/ |
vendor/davey/ |
Serein's patch of davey 0.1.4 (see vendor/davey/SEREIN-PATCH.md) |
vendor/hpke-rs/ |
vendor/hpke-rs/ |
Serein's security backport of hpke-rs 0.6.1 (see vendor/hpke-rs/SEREIN-PATCH.md); CI files dropped |
RustCord's own, under the crate's MIT OR Apache-2.0 terms: src/settings.rs (audio
preferences, device list, mic test), src/stream_mix.rs (watched-stream audio in the call
mix), src/stats.rs (Go Live statistics), src/health.rs (call health counters),
src/agc.rs (microphone gain), src/echo.rs (echo cancellation), src/mic.rs (microphone resampling), src/ogg_opus.rs
(soundboard decoding), src/screen/camera_windows.rs (camera capture) and
src/screen/cursor_windows.rs (the pointer in captured frames).
vendor/hpke-rs/src/serein_sha3.rs is also compiled into this crate (src/lib.rs includes
it by path); it stays under MPL-2.0 like the rest of hpke-rs. The dependency versions below
are the locked ones (Cargo.lock).
MIT License
Copyright (c) 2026 Serein contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Vendored sources
- davey 0.1.4 (MIT, Copyright (c) Snazzah, https://github.com/Snazzah/davey), with
Serein's manifest-only patch removing OpenMLS'
jsfeature. License:vendor/davey/LICENSE. - hpke-rs 0.6.1 (MPL-2.0, Cryspen, https://github.com/cryspen/hpke-rs), with Serein's
backport replacing
libcrux-sha3(RUSTSEC-2026-0207/0208/0212) by RustCryptosha3. MPL-2.0 is file-level copyleft: the complete source of these files, including the modifications, ships invendor/hpke-rs/and must stay available in source form with binary distributions. License:vendor/hpke-rs/LICENSE-MPL-2.0.txt.
Cargo applies [patch.crates-io] only from the workspace root. When RustCord depends on this
crate, its root Cargo.toml needs the same two entries
(davey = { path = "crates/voice/vendor/davey" }, hpke-rs = { path = "crates/voice/vendor/hpke-rs" })
to get the identical graph; without them the unpatched crates.io releases are used.
Third-party crates
Direct dependencies (versions pinned to Serein's lockfile):
| Crate | Version | License |
|---|---|---|
| tokio | 1.54.1 | MIT |
| tokio-tungstenite / tungstenite | 0.30.0 | MIT / MIT OR Apache-2.0 |
| rustls | 0.23.46 | Apache-2.0 OR ISC OR MIT |
| ring (rustls provider) | 0.17.14 | Apache-2.0 AND ISC |
| webpki-roots | 1.0.11 | CDLA-Permissive-2.0 (Mozilla CA data) |
| futures-util | 0.3.34 | MIT OR Apache-2.0 |
| serde_json | 1.0.151 | MIT OR Apache-2.0 |
| zeroize | 1.9.0 | Apache-2.0 OR MIT |
| url | 2.5.8 | MIT OR Apache-2.0 |
| getrandom | 0.4.3 | MIT OR Apache-2.0 |
| tracing | 0.1.44 | MIT |
| davey | 0.1.4 (vendored) | MIT |
| openmls | 0.8.1 | MIT |
| chacha20poly1305 | 0.10.1 | Apache-2.0 OR MIT |
| opus2 | 0.4.0 | MIT/Apache-2.0 |
| libopus_sys (bundles libopus) | 0.3.3 | MIT; bundled libopus is BSD-3-Clause (Xiph.Org Foundation, Skype Limited, Octasic, Jean-Marc Valin, Timothy B. Terriberry, CSIRO, Gregory Maxwell, Mark Borgerding, Erik de Castro Lopo) |
| rtrb | 0.4.0 | MIT OR Apache-2.0 |
| cpal | 0.18.2 | Apache-2.0 |
| nnnoiseless (RustCord addition: Voice Isolation) | 0.5.2 | BSD-3-Clause (RNNoise: Joe Neeman, Mozilla, Jean-Marc Valin, Xiph.Org Foundation, Mark Borgerding); its FFT crates easyfft, rustfft, realfft, num-complex, transpose, strength_reduce, primal-check, generic_singleton, array-init are MIT OR Apache-2.0 / MIT, anymap3 BlueOak-1.0.0 OR MIT OR Apache-2.0 |
| sonora (RustCord addition: Echo Cancellation) | 0.3.0 | BSD-3-Clause (WebRTC's audio processing ported to Rust: The WebRTC Project Authors, Arun Raghavan and contributors, dignifiedquire; notice in the root THIRD_PARTY_NOTICES.md); with its crates sonora-aec3, sonora-agc2, sonora-ns, sonora-common-audio, sonora-fft and sonora-simd 0.3.0 (BSD-3-Clause); its helpers derive_more 2 (MIT), bytemuck 1 (Zlib OR Apache-2.0 OR MIT) and cpufeatures 0.3 (MIT OR Apache-2.0) were already in the graph |
| windows (Windows only) | 0.61.3 | MIT OR Apache-2.0 |
| windows-core, windows-future (Windows only) | 0.61.2, 0.2.1 | MIT OR Apache-2.0 |
| openh264 (Go Live decoding and encoder fallback, as in Serein) | 0.9.8 | BSD-2-Clause (Ralf Biedert); openh264-sys2 0.9.8 compiles Cisco's bundled OpenH264 sources, BSD-2-Clause (Copyright (c) 2013, Cisco Systems); its SIMD helpers wide 1.7.1 and safe_arch 1.2.0 are Zlib OR Apache-2.0 OR MIT; build-time nasm-rs 0.3.2 is MIT OR Apache-2.0 (assembly is used only when nasm is installed) |
| windows-capture (Go Live screen capture, Windows only) | 2.0.1 | MIT (NiiightmareXD); pulls windows 0.62.2, windows-future 0.3.2, parking_lot, rayon and thiserror, all MIT OR Apache-2.0 |
| rayon (Go Live picture conversion; already pulled by windows-capture and openmls) | 1.12.0 | MIT OR Apache-2.0 |
| socket2 (Go Live UDP buffer sizes; already pulled by tokio) | 0.6.5 | MIT OR Apache-2.0 |
| sha3, openmls_rust_crypto, openmls_basic_credential (tests) | 0.10.9, 0.5.1, 0.5.0 | MIT OR Apache-2.0, MIT, MIT |
Licenses found in the complete Windows dependency graph: MIT OR Apache-2.0 (most RustCrypto,
windows-rs, serde, rand, url crates), MIT (tokio, openmls family, davey, tracing, bytes,
mio), Unicode-3.0 (ICU crates used by url/idna), BSD-3-Clause (curve25519-dalek,
ed25519-dalek, x25519-dalek, subtle, nnnoiseless, the sonora crates, and the bundled libopus
C sources), BSD-2-Clause
(openh264, openh264-sys2 and the bundled OpenH264 C++ sources), Zlib OR Apache-2.0 OR MIT
(wide, safe_arch), MPL-2.0
(hpke-rs, hpke-rs-crypto, hpke-rs-rust-crypto), ISC (rustls-webpki, untrusted),
Apache-2.0 AND ISC (ring), Apache-2.0 (cpal), CDLA-Permissive-2.0 (webpki-roots),
Unlicense OR MIT (memchr), BSD-2-Clause OR Apache-2.0 OR MIT (zerocopy).
cargo metadata lists the exact package set. Binary distributions must carry the
BSD-3-Clause notices of libopus, nnnoiseless (RNNoise) and sonora (WebRTC; both in the root THIRD_PARTY_NOTICES.md) and the dalek crates, the BSD-2-Clause notice of OpenH264
(in the root THIRD_PARTY_NOTICES.md), the ISC notices of ring and rustls-webpki, and
the CDLA-Permissive-2.0 notice of webpki-roots. H.264 is patent-encumbered: the OpenH264
copyright licence grants no patent rights, and Cisco's royalty coverage applies only to
its own prebuilt binaries, not to this source build.