Data tracks UniFFI - #1034
Conversation
Makes sense, I implemented the latter in 4f18c9c. This replaces the |
Rust has these additional helpers to keep the interface between the rest of the client SDK and the data tracks managers as uniform as possible; instead of caring about specific fields in each response type, you hand over the whole response, and the logic of how the required information is extracted is kept as an implementation detail. A few other advantages:
I implemented |
Data tracks is fully released in OSS and Cloud now so this would be unexpected. Do you have any repro steps for this? |
No repro — false alarm on my side. The join does carry That RAII-on-drop is really the last open question: should FFI consumers mirror Rust's semantics (drop = unpublish) or go "publication-like" (JS keeps the publication in its manager until an explicit unpublish)? We went publication-like on the Swift side so callers aren't forced to retain the handle — this diff shows it: livekit/client-sdk-swift@3e3043e Framing it as "what should the convention be" rather than "should Rust change": the core's RAII is correct/idiomatic for Rust consumers — the divergence is about what the FFI bindings present. JS and (now) Swift both land on publication-like, so there's a de-facto convention worth making explicit. For concreteness, the Swift lifecycle surface:
|
pblazej
left a comment
There was a problem hiding this comment.
I don't see any functional gaps here preventing Swift integration
The rest is mostly consumer-side discussion (like the RAII pattern mentioned above).
Before merging please update both SPM_SIZE_LIMIT_BYTES and ANDROID_SIZE_LIMIT_BYTES with the final sizes.
Approximate sizes @ the latest commit:
SPM_SIZE_LIMIT_BYTES = 1152136ANDROID_SIZE_LIMIT_BYTES = 1250710
|
@hiroshihorie cc what's your take on applying that in flutter (as the infra is ~complete)? |
Add subscribe_with_options on RemoteDataTrack and a DataTrackSubscribeOptions record (buffer_size) so foreign consumers can tune the internal frame buffer, matching the core and JS subscribe APIs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d0c8d7b to
eda4a11
Compare
163cdd9 to
61bd528
Compare
|
I have temporarily disable Dart tests in CI since they are currently failing. In the interest of getting this merged, we can address in a follow-up PR. |
…1300) - build-android-*: cargo-make's `extend` replaces the parent env map rather than merging it, so `env = { TARGET = ... }` silently dropped ANDROID_RELEASE_FLAG and RUSTFLAGS — `--profile release` produced debug .so files and android-copy-jniLibs found nothing in target/*/release. Derive the flag from CARGO_MAKE_PROFILE in the script instead. - android-bindgen-kotlin: TARGET leaks across cargo-make tasks, so bindgen-kotlin's `build` dependency cross-compiled for Android with the host linker ("cannot find -llog"). Pin TARGET back to the host triple and keep symbols, which library-mode bindgen needs on Linux. - Raise both size gates to measured values: ios-arm64 is 1088 KiB and arm64-v8a 1174 KiB, having grown past the limits set in #1171 when the data-track UniFFI surface landed in #1034. - Check out inputs.tag_name in both reusable workflows; workflow_dispatch was building the dispatch ref (main) rather than the requested tag. ### Before you submit your PR Make sure the following is true before submitting your PR: - [ ] I have read the [contributing guidelines](https://github.com/livekit/rust-sdks/blob/main/CONTRIBUTING.md) and validated that this PR will be accepted. - [ ] I have read and followed the principles regarding breaking changes, testing, and code quality. ### PR description Describe the changes in this PR. Explain what the PR is meant to solve and how to reproduce the issue in the first place. ### Breaking changes If this PR introduces breaking changes, list them here and document the rationale for introducing such a change. ### MSRV If the PR modifies the crate's MSRV (Minimum Supported Rust Version), document it here. ### Testing Ideally, unit test the code you add, but ensure you're not repeating existing test cases. Use as many already written scaffolding, utilities as possible; write your own, when needed. If external services, APIs, tokens are required (e.g., running an LK server instance), provide the necessary information. Make sure your tests perform useful, context-aware assertions and do not simply emulate "happy paths". ### Async We want the project to be runtime-agnostic, so please reuse what's already in [livekit-runtime](https://github.com/livekit/rust-sdks/blob/main/livekit-runtime/) and feel free to add anything missing. It's ok to use Tokio directly, when writing unit tests, if necessary. When testing, do not use artificial delays for the state to "catch up"; instead, respect the event flow and subscribe properly using channels or other mechanisms. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary of changes:
livekit-uniffiResolves CLT-2472