Skip to content

fix(core): Comprehensive fixes and performance optimizations#5

Draft
ehfd wants to merge 3 commits into
linuxserver:masterfrom
ehfd:comprehensive-fixes
Draft

fix(core): Comprehensive fixes and performance optimizations#5
ehfd wants to merge 3 commits into
linuxserver:masterfrom
ehfd:comprehensive-fixes

Conversation

@ehfd

@ehfd ehfd commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Complementary to selkies-project/selkies#254. Backward-incompatible components.

@ehfd ehfd changed the title fix(core): Performance optimizations fix(core): Comprehensive fixes and performance optimizations Jun 13, 2026
@ehfd ehfd force-pushed the comprehensive-fixes branch 2 times, most recently from 8cc4589 to 3d19f97 Compare June 15, 2026 03:56

@PMohanJ PMohanJ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed the core module. The build is successful; deployed and verified in selkies container - no regression bugs.

@ehfd ehfd marked this pull request as ready for review June 15, 2026 12:53
@ehfd ehfd force-pushed the comprehensive-fixes branch from 3d19f97 to 089f7a6 Compare June 20, 2026 08:57
@ehfd ehfd force-pushed the comprehensive-fixes branch 4 times, most recently from d06df37 to 1fa110f Compare June 21, 2026 16:22
@ehfd ehfd force-pushed the comprehensive-fixes branch from 1fa110f to 8a98c69 Compare June 22, 2026 06:36
@ehfd ehfd force-pushed the comprehensive-fixes branch from cff394a to 2d4593c Compare July 2, 2026 12:28
Copilot AI review requested due to automatic review settings July 2, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates pcmflux from a C++ shared library + Python ctypes wrapper to a single native Rust (PyO3) extension module, and updates the example server/client to match the new zero-copy AudioFrame callback API and wire framing.

Changes:

  • Replaces the C++/ctypes implementation with a Rust pcmflux PyO3 extension (PulseAudio capture, Opus encoding, silence gate, WS framing + RED support, lifecycle safety).
  • Updates Python packaging/build configuration to build the Rust extension via setuptools-rust and adjusts sdist contents.
  • Updates the demo server/client to consume the new callback signature, avoid extra copies, and improve backpressure/monitoring.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
setup.py Switches packaging to build a Rust PyO3 extension; sets default RUSTFLAGS for x86_64.
README.md Expands usage/API documentation for the new callback + framing, but contains outdated C++/ctypes references.
pyproject.toml Adds setuptools-rust and updates cibuildwheel configuration/provisioning for Rust builds.
pcmflux/src/lib.rs New Rust implementation of capture/encode pipeline + PyO3 API types and tests.
pcmflux/Cargo.toml New Rust crate manifest for the PyO3 extension and native deps.
pcmflux/Cargo.lock Locks Rust dependency graph for reproducible builds.
pcmflux/audio_capture_module.cpp Removes the prior C++ PulseAudio/Opus implementation.
pcmflux/init.py Removes the prior Python ctypes wrapper API.
MANIFEST.in Updates sdist include/exclude rules for Rust sources and build artifacts.
example/index.html Updates client to strip the new 2-byte header, use monotonic timestamps, and add worklet/backpressure reporting.
example/audio_to_browser.py Updates server to use the new Python API/callback and improves queue bounding, fan-out, and HTTP path hardening.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup.py Outdated
Comment thread README.md Outdated
Comment thread example/audio_to_browser.py Outdated
Comment thread example/audio_to_browser.py Outdated
Comment thread example/audio_to_browser.py Outdated
Comment thread example/audio_to_browser.py Outdated
Comment thread setup.py
Comment thread README.md
Comment thread README.md Outdated
@ehfd ehfd force-pushed the comprehensive-fixes branch 2 times, most recently from 0cbadcb to 3dadfdf Compare July 9, 2026 07:31
@ehfd ehfd force-pushed the comprehensive-fixes branch from 3dadfdf to 3ed456b Compare July 9, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants