Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
38d0e34
feat: bind the Rust Video SDK as a native module
dangusev Sep 29, 2026
11c7380
rust: release GIL before accessing inner wrapper state in Call and Lo…
dangusev Sep 29, 2026
603a477
rust: route wrapper logs as internal SDK logs
dangusev Sep 29, 2026
3caea52
agents.md: add more instructions for Rust and PyO3 wrapping
dangusev Sep 29, 2026
92a006e
rust: convert _native to a module
dangusev Sep 29, 2026
276a35c
rust: move _native_logging to _native/logging
dangusev Sep 29, 2026
0b6f455
rust: rename _native to _rust, make bindings a core module
dangusev Sep 29, 2026
7c9ee38
rust: expose wrapped Rust SDK errors as exceptions
dangusev Sep 29, 2026
4e4c859
rust: forward SDK logs in tests
dangusev Sep 29, 2026
882ba67
rust: use one session fixture for call users
dangusev Sep 29, 2026
198edc1
rust: bump Rust SDK revision
dangusev Sep 29, 2026
5b56f83
rust:set module for pyclasses to have normal path instead of "builtins"
dangusev Sep 29, 2026
182bef6
rust: bind stop_publish, screen share and pcm_queue_capacity
dangusev Sep 30, 2026
a428cdf
rust: rewire ConnectionManager onto the Rust SDK
dangusev Oct 2, 2026
efed647
rtc: re-export track and event classes from getstream.video.rtc
dangusev Oct 2, 2026
7274bc2
rust: bump Rust SDK revision to 63e5fa6
dangusev Oct 5, 2026
b19928b
rtc: replace the published track of the same kind in add_tracks
dangusev Oct 5, 2026
0f5d1ba
rust: bump Rust SDK revision to 77f8dd3
dangusev Oct 5, 2026
73cbcd6
rtc: remove the aiortc transport code from ConnectionManager
dangusev Oct 5, 2026
4811651
rtc: delete the aiortc transport modules
dangusev Oct 5, 2026
ad8a827
deps: remove unused packages from the webrtc extra
dangusev Oct 5, 2026
7bef818
rust: bump Rust SDK revision to b7bb737
dangusev Oct 5, 2026
971a88f
scripts: delete the aiortc SFU connect script
dangusev Oct 5, 2026
11d9c27
examples: add an echo agent that uses the public rtc API
dangusev Oct 5, 2026
a3ec103
rtc: end the forwarding when the SDK stops the published track
dangusev Oct 5, 2026
68cef33
examples: add an audio recorder that uses the public rtc API
dangusev Oct 5, 2026
11d2ec4
rtc: fix the type check errors
dangusev Oct 5, 2026
99e603d
rust: bump Rust SDK revision to dbfd13c
dangusev Oct 5, 2026
566045f
rust: bump Rust SDK revision to ef8694d
dangusev Oct 6, 2026
6ba558b
rust: bump Rust SDK revision to f19b7e4
dangusev Oct 7, 2026
f2b8acb
rtc: move the Rust extension into the getstream-rtc package
dangusev Oct 7, 2026
259bef3
docs: describe the getstream-rtc package in AGENTS.md
dangusev Oct 7, 2026
bc67bb1
tests: move the binding tests into getstream-rtc
dangusev Oct 7, 2026
5f5837b
ci: build getstream-rtc only in the video and Rust jobs
dangusev Oct 7, 2026
4c511a7
rtc: resample with the SDK StreamResampler
dangusev Oct 9, 2026
855e455
chore: update migration.md and uv.lock
dangusev Oct 9, 2026
78c19f7
rtc: end streams created after leave() at once
dangusev Oct 9, 2026
5a0fedc
rtc: start log forwarding on first use and configure it off the loop
dangusev Oct 9, 2026
b1decaa
rtc: log the failure of a publish forwarder
dangusev Oct 9, 2026
20f399c
rtc: start no publish forwarder after leave() has begun
dangusev Oct 9, 2026
8447041
tests, docs: fix the custom event test and describe the fork limit
dangusev Oct 9, 2026
7a442c4
rust: bump Rust SDK revision to c865308
dangusev Oct 13, 2026
e5a4574
docs: compare migration.md with 6.1.1 and describe SDK c865308
dangusev Oct 14, 2026
651352a
rtc: handle a track queue overflow and a failed leave()
dangusev Oct 14, 2026
3379873
ci: do not keep the checkout credential in the test jobs
dangusev Oct 14, 2026
ec3fa04
chore: run the getstream-rtc tests in make test-all
dangusev Oct 14, 2026
13e0de2
chore: fix the protocol folder comment in .gitignore
dangusev Oct 14, 2026
ee0dcc3
chore: undo the dependency upgrade and keep ruff below 0.16
dangusev Oct 14, 2026
971a3b3
examples: load .env and stop quietly on Ctrl+C
dangusev Oct 14, 2026
0ab2b18
rtc: update example page url in open_browser()
dangusev Oct 14, 2026
939137a
examples: select the webrtc extra in the run commands
dangusev Oct 14, 2026
b623b98
rtc: fix the participants after a rejoin and the call_ended reason
dangusev Oct 14, 2026
0ada604
rtc: document that a revoked grant stops or mutes a published track
dangusev Oct 15, 2026
3e1568e
rtc: deliver Rust log records from a Python thread
dangusev Oct 15, 2026
0951fee
rtc: parse coordinator events with the same values and key order as j…
dangusev Oct 15, 2026
c71f15e
rtc: log SDK events that have no Python class
dangusev Oct 15, 2026
70b5a5d
rtc: pin the Rust SDK to a commit on main
dangusev Oct 15, 2026
16aa3c2
rtc: convert unknown participant enum values as the SDK does
dangusev Oct 16, 2026
189cbea
rtc: test the other JSON kinds of coordinator event data
dangusev Oct 16, 2026
7c7d98f
docs: update migration.md for the review fixes
dangusev Oct 16, 2026
d75634a
ci: start getstream-rtc at 0.1.0 and bump its version in uv.lock
dangusev Oct 20, 2026
14f61ba
rtc: use the getstream crate 0.1.0 from crates.io
dangusev Oct 20, 2026
933dbaa
ci: require a matching Cargo.lock in CI
dangusev Oct 20, 2026
affa317
ci: build and check the getstream-rtc wheels on PRs
dangusev Oct 20, 2026
f3b00d4
ci: publish the getstream-rtc wheels before getstream
dangusev Oct 20, 2026
5a7fc6a
docs: update the build requirements and the contributor docs
dangusev Oct 20, 2026
9aa6189
rtc: leave the call when Python frees a joined Call
dangusev Oct 20, 2026
05714c0
rtc: document the call_event_capacity limit
dangusev Oct 20, 2026
303ea5d
rtc: drop the unread tracks of an earlier join
dangusev Oct 21, 2026
9370911
rtc: let wait() return after a failed connect()
dangusev Oct 21, 2026
bde7b5d
rtc: show the webrtc install hint when the extra is missing
dangusev Oct 21, 2026
4108f3a
rtc: document that a cancelled read can lose its item
dangusev Oct 21, 2026
baba5b9
tests: drop unused large assets and fix pre-existing test issues
dangusev Oct 21, 2026
bcb7f77
rtc: cancel the join in the test when it reports JOINING
dangusev Oct 21, 2026
d313a08
rtc: make CallingState and TrackType hashable
dangusev Oct 21, 2026
0920e1e
dev: remove torch and torchaudio
dangusev Oct 21, 2026
695d86d
rtc: finish the SDK stop when add_tracks replaces an ended track
dangusev Oct 21, 2026
0b38ca8
rtc: correct docstrings and comments
dangusev Oct 21, 2026
e988f7a
tests: report lost events and writer errors in the rtc tests
dangusev Oct 21, 2026
10879a3
tests: annotate the rtc test functions
dangusev Oct 21, 2026
e8b0422
docs: record the kick and block behavior
dangusev Oct 21, 2026
0c49760
tests: delete unused test assets
dangusev Oct 21, 2026
700477b
tests: do not shadow Handler.release in the blocking handler
dangusev Oct 21, 2026
7311465
rtc: update the Rust SDK to 0.2.0-preview.1 and send frame times
dangusev Oct 21, 2026
de5d0da
docs: remove the Other bugs section from migration.md
dangusev Oct 21, 2026
91e0955
rtc: update the Rust SDK to 0.2.0
dangusev Oct 22, 2026
5560dcd
docs: rename migration.md to MIGRATION_v6_to_v7.md and update it
dangusev Oct 22, 2026
cc1aecc
ci: pin the external actions to commit SHAs
dangusev Oct 22, 2026
01ae5a9
docs: state that 6.1.1 also used TURN only over UDP
dangusev Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/actions/build-rtc-wheel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build the getstream-rtc wheel
description: >-
Builds the getstream-rtc wheel of the runner's platform into wheel-dir, and
checks it in a clean environment. Linux builds run in the manylinux_2_28
container; macOS builds support macOS 11 or later.
inputs:
cache:
description: >-
"true" restores and saves the sccache and Cargo download caches. Release
builds keep "false": Cargo does not check a cached crate again.
required: false
default: "false"
outputs:
wheel-dir:
description: The directory that holds the wheel
value: ${{ github.workspace }}/rtc-wheel
runs:
using: composite
steps:
- name: Cache the Cargo downloads
if: inputs.cache == 'true' && runner.os == 'Linux'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
# Mounted at /root/.cargo in the container (docker-options below).
path: ${{ github.workspace }}/.cargo-container
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('getstream-rtc/Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-${{ runner.arch }}-

- name: Cache the Cargo downloads
if: inputs.cache == 'true' && runner.os == 'macOS'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: cargo-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('getstream-rtc/Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-${{ runner.arch }}-

- name: Build the wheel
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
with:
working-directory: getstream-rtc
manylinux: "2_28"
args: --release --locked --out ${{ github.workspace }}/rtc-wheel
sccache: ${{ inputs.cache }}
docker-options: >-
${{ inputs.cache == 'true' && format('-v {0}/.cargo-container/registry:/root/.cargo/registry -v {0}/.cargo-container/git:/root/.cargo/git', github.workspace) || '' }}

- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false

- name: Check the wheel
shell: bash
run: |
venv="$RUNNER_TEMP/rtc-wheel-check"
uv venv --quiet --python 3.12 "$venv"
uv pip install --quiet --python "$venv" "$GITHUB_WORKSPACE"/rtc-wheel/*.whl
extension="$("$venv/bin/python" -c 'import getstream_rtc._bindings as b; print(b.__file__)')"
if [ "$RUNNER_OS" = macOS ]; then
libraries="$(otool -L "$extension")"
else
libraries="$(readelf -d "$extension" | grep NEEDED)"
fi
echo "$libraries"
if grep -qi vpx <<< "$libraries"; then
echo "::error::The extension links libvpx dynamically."
exit 1
fi
26 changes: 23 additions & 3 deletions .github/actions/python-uv-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,29 @@ inputs:
description: Directory to run in
required: false
default: "."
build-extension:
description: Build getstream-rtc (the Rust extension) into the environment; "false" installs everything else
required: false
default: "true"
runs:
using: composite
steps:
- name: Install the Rust toolchain
if: ${{ inputs.build-extension == 'true' }}
shell: bash
working-directory: ${{ inputs.working-directory }}/getstream-rtc
# Installs the toolchain pinned in getstream-rtc/rust-toolchain.toml.
run: rustup toolchain install

- name: Cache the Rust build
if: ${{ inputs.build-extension == 'true' }}
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
workspaces: ${{ inputs.working-directory }}/getstream-rtc

- name: Install the latest version of uv
id: setup_uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
python-version: ${{ inputs.python-version }}
version: "latest"
Expand All @@ -38,5 +55,8 @@ runs:
- name: Install the project dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: uv sync ${{ inputs.sync-flags }}

env:
# A Cargo.lock that does not match Cargo.toml fails the build of getstream-rtc
# instead of being updated.
MATURIN_PEP517_ARGS: --locked
run: uv sync ${{ inputs.sync-flags }} ${{ inputs.build-extension != 'true' && '--no-install-package getstream-rtc' || '' }}
2 changes: 1 addition & 1 deletion .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
name: 👮 Conventional PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107 changes: 98 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:
inputs:
publish_tag:
description: 'Existing tag to (re)publish to PyPI, e.g. v6.1.1. Leave empty for a normal release run.'
description: 'Existing tag to (re)publish to PyPI, e.g. v6.1.1 or getstream-rtc-v0.1.0. Leave empty for a normal release run.'
required: false
default: ''

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: googleapis/release-please-action@v4
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
Expand Down Expand Up @@ -176,8 +176,10 @@ jobs:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
rtc_release_created: ${{ steps.release.outputs['getstream-rtc--release_created'] }}
rtc_tag_name: ${{ steps.release.outputs['getstream-rtc--tag_name'] }}
steps:
- uses: googleapis/release-please-action@v4
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
id: release
with:
config-file: release-please-config.json
Expand All @@ -189,12 +191,85 @@ jobs:
# created with GITHUB_TOKEN starts no new workflow run. Also reachable on its own
# through workflow_dispatch with publish_tag, which is the recovery path once
# GitHub has retired the original run and "Re-run failed jobs" is gone.
# Each platform builds its wheel from the tag and uploads it in the same job, with no
# cache and no artifact. --check-url skips the wheels that PyPI already has, so a run
# with publish_tag uploads only the missing wheels of an incomplete release.
publish-rtc:
name: 📦 Publish getstream-rtc (${{ matrix.platform }})
needs: release
if: >-
!cancelled() &&
(startsWith(inputs.publish_tag, 'getstream-rtc-v') || needs.release.outputs.rtc_release_created == 'true')
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x86_64
runner: ubuntu-latest
- platform: linux-aarch64
runner: ubuntu-24.04-arm
- platform: macos-arm64
runner: macos-latest
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Resolve tag
id: target
env:
PUBLISH_TAG: ${{ inputs.publish_tag }}
RELEASE_TAG: ${{ needs.release.outputs.rtc_tag_name }}
run: |
tag="${PUBLISH_TAG:-$RELEASE_TAG}"
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
echo "version=${tag#getstream-rtc-v}" >> "$GITHUB_OUTPUT"

- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ steps.target.outputs.tag }}
persist-credentials: false

- name: Build and check the wheel
id: wheel
uses: ./.github/actions/build-rtc-wheel

- name: Publish to PyPI (Trusted Publishing)
env:
WHEEL_DIR: ${{ steps.wheel.outputs.wheel-dir }}
run: uv publish --check-url https://pypi.org/simple/ "$WHEEL_DIR"/*.whl

- name: Verify pip install
env:
REQUIREMENT: getstream-rtc==${{ steps.target.outputs.version }}
MODULE: getstream_rtc
run: |
# Outside the checkout, so that no project file or source directory is used.
cd "$RUNNER_TEMP"
uv venv --quiet --python 3.12 verify
# PyPI can take a few minutes to list a new release.
for attempt in 1 2 3 4 5 6 7 8 9 10; do
if uv pip install --quiet --no-cache --python verify "$REQUIREMENT"; then
verify/bin/python -c "import $MODULE"
exit
fi
sleep 30
done
echo "::error::$REQUIREMENT could not be installed from PyPI."
exit 1

# Waits for publish-rtc, so that PyPI never has a getstream that requires a
# getstream-rtc which is not uploaded.
publish:
name: 📦 Publish to PyPI
needs: release
needs: [release, publish-rtc]
if: >-
!cancelled() &&
(inputs.publish_tag != '' || needs.release.outputs.release_created == 'true')
(needs.publish-rtc.result == 'success' || needs.publish-rtc.result == 'skipped') &&
((inputs.publish_tag != '' && !startsWith(inputs.publish_tag, 'getstream-rtc-v')) ||
needs.release.outputs.release_created == 'true')
runs-on: ubuntu-latest
timeout-minutes: 15
# PyPI Trusted Publishing is bound to this workflow file name and this environment.
Expand All @@ -213,14 +288,16 @@ jobs:
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"

- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ steps.target.outputs.tag }}
# uv build and uv publish execute project and dependency code, and nothing
# here writes to the repository, so do not leave GITHUB_TOKEN in .git/config.
persist-credentials: false

- uses: ./.github/actions/python-uv-setup
with:
build-extension: "false"

- name: Build distributions
run: uv build
Expand All @@ -230,7 +307,19 @@ jobs:

- name: Verify pip install
env:
UV_NO_SOURCES: "1"
REQUIREMENT: getstream[webrtc]==${{ steps.target.outputs.version }}
MODULE: getstream.video.rtc
run: |
uv pip install "getstream==${{ steps.target.outputs.version }}" || \
echo "WARNING: pip install verification failed (PyPI index may need a moment to propagate)"
# Outside the checkout, so that no project file or source directory is used.
cd "$RUNNER_TEMP"
uv venv --quiet --python 3.12 verify
# PyPI can take a few minutes to list a new release.
for attempt in 1 2 3 4 5 6 7 8 9 10; do
if uv pip install --quiet --no-cache --python verify "$REQUIREMENT"; then
verify/bin/python -c "import $MODULE"
exit
fi
sleep 30
done
echo "::error::$REQUIREMENT could not be installed from PyPI."
exit 1
42 changes: 42 additions & 0 deletions .github/workflows/rtc_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: getstream-rtc wheels
# Builds and checks the wheels of the release platforms; nothing is uploaded.
# The release builds them again from the tag (release.yml).
on:
pull_request:
paths:
- "getstream-rtc/**"
- ".github/actions/build-rtc-wheel/**"
- ".github/workflows/rtc_wheels.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: rtc-wheels-${{ github.ref }}
cancel-in-progress: true

jobs:
wheel:
name: 🦀 Wheel (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
include:
- platform: linux-x86_64
runner: ubuntu-latest
- platform: linux-aarch64
runner: ubuntu-24.04-arm
- platform: macos-arm64
runner: macos-latest
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
- name: Build and check the wheel
uses: ./.github/actions/build-rtc-wheel
with:
cache: "true"
9 changes: 7 additions & 2 deletions .github/workflows/run_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
with:
python-version: ${{ matrix.python-version }}
build-extension: "false"
- name: Run integration tests
env:
STREAM_API_KEY: ${{ vars.STREAM_CHAT_API_KEY }}
Expand All @@ -54,7 +57,9 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
persist-credentials: false
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
with:
Expand Down
Loading
Loading