Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid tokio-stream dependency when using a runtime other than tokio #349

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

maxbrunsfeld
Copy link
Contributor

This is a follow-up to #310

When building the main livekit crate the async or dispatcher features (as opposed to the default tokio feature), we already have a dependency on the futures crate, which provides the Stream trait, so we don't need a dependency on tokio-stream.

As a drive-by, I fixed a test that was failing in CI due to a missing tokio runtime, by applying the tokio::test macro to that test (which sets up a tokio runtime automatically).

@maxbrunsfeld
Copy link
Contributor Author

It looks like the yuv-sys crate is failing to build on the android targets:

[yuv-sys 0.3.6] exit status: 0
[yuv-sys 0.3.6] cargo:rustc-link-lib=static=yuv
[yuv-sys 0.3.6] cargo:rustc-link-search=native=/home/runner/work/rust-sdks/rust-sdks/target/aarch64-linux-android/release/build/yuv-sys-fbedbf06764db0b3/out
[yuv-sys 0.3.6] /usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not found
[yuv-sys 0.3.6] thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/yuv-sys-0.3.6/build.rs:141:37:
[yuv-sys 0.3.6] called `Result::unwrap()` on an `Err` value: ClangDiagnostic("/usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not found\n")
[yuv-sys 0.3.6] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to run custom build command for `yuv-sys v0.3.6`

@theomonnom
Copy link
Member

It looks like the yuv-sys crate is failing to build on the android targets:

Seems unrelated to this PR

@theomonnom
Copy link
Member

lgtm, thanks!

@theomonnom theomonnom merged commit 9c2a467 into livekit:main Jun 20, 2024
7 of 16 checks passed
@maxbrunsfeld maxbrunsfeld deleted the swap-stream-crate branch June 20, 2024 21:58
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.

None yet

2 participants