Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ name: Android
# recipe is still `just rs android`, so a local run and this one compile the
# same thing, and rust-toolchain.toml still pins the compiler.
#
# It also builds moq-ffi and asserts the `.so` imports `__android_log_*`, so a
# build that stops linking logcat fails here.
#
# Narrow trigger, like wasm.yml. The filter is moq-video's in-repo dependency
# graph (`cargo metadata`, normal dependencies), plus the files that decide how
# it is built. A crate added to that graph has to be added here too.
# graph (`cargo metadata`, normal dependencies), plus moq-ffi and moq-tokio, which
# own the logcat link, and the files that decide how it is built. A crate added
# to that graph has to be added here too.

permissions:
contents: read
Expand All @@ -25,6 +29,8 @@ on:
types: [opened, synchronize, reopened, closed]
paths:
- "rs/moq-video/**"
- "rs/moq-ffi/**"
- "rs/moq-tokio/**"
- "rs/moq-mux/**"
- "rs/moq-net/**"
- "rs/moq-nvenc/**"
Expand Down
1 change: 0 additions & 1 deletion quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ QUIC studies there on that rule.
- [Merge queue](/quest/m1/merge-queue.md) - the required checks run on `merge_group`, so a stale green check can no longer break main
- [Binding audio delay](/quest/m1/binding-surface.md) - moq-ffi and every wrapper configure and observe audio playout delay
- [FFI shape](/quest/m1/ffi-shape/README.md) - the bindings mirror Rust's layers: net at the root, then media, json, flate, audio, and video namespaces built from the handle below
- [Android logcat](/quest/m1/android-logcat.md) - on dev, Android builds always log to logcat and the `android-logcat` feature is gone
- [Raw stream codes](/quest/m1/raw-stream-codes.md) - raw QUIC stream resets and stops carry the application's code, not an HTTP/3-mapped one
- [IETF drain before close](/quest/m1/ietf-drain-before-close.md) - moq-transport sessions deliver finished tracks before a graceful close, as moq-lite does
- [Close waits for the tail](/quest/m1/close-tail.md) - on lite-07, `close()` returns `Ok` only after each subscriber FINs its Subscribe Stream, having read the track to its end
Expand Down
41 changes: 0 additions & 41 deletions quest/m1/android-logcat.md

This file was deleted.

5 changes: 4 additions & 1 deletion rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,13 @@ capture-test *args:
# than a denying clippy: the capture plumbing is dead on a target without a
# capture backend.

# Compile the Android backends, which the host-target check skips.
# Compile the Android backends, which the host-target check skips, and assert the
# moq-ffi library links logcat: `Log::init` is silent on Android without it.
[positional-arguments]
android *args:
cargo ndk -t arm64-v8a --platform 26 check --locked -p moq-video --all-targets "$@"
cargo ndk -t arm64-v8a --platform 26 -o target/android-jni build --locked -p moq-ffi "$@"
nm -D --undefined-only target/android-jni/arm64-v8a/libmoq_ffi.so | grep -q __android_log_

# moq-wasm's crate root is `#![cfg(target_arch = "wasm32")]`, so only a wasm32
# build sees the code. Not to be confused with `just js wasm`, which builds the
Expand Down
1 change: 0 additions & 1 deletion rs/moq-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ crate-type = ["staticlib", "cdylib"]
# They are unavailable on wasm32 regardless: the browser encodes via WebCodecs.
default = ["audio", "video"]

android-logcat = ["moq-tokio/android-logcat"]
audio = ["dep:moq-audio"]
video = ["dep:moq-video", "dep:pollster"]

Expand Down
3 changes: 1 addition & 2 deletions rs/moq-tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ tcp = ["_transport", "dep:qmux", "dep:dns-lookup"]
# inspection on accept. Pulls in `tcp` (shares qmux's stream transport).
uds = ["tcp", "qmux/uds"]
ring = ["_certs", "rustls/ring", "rcgen/ring", "web-transport-moq?/ring"]
android-logcat = ["dep:tracing-android"]

[dependencies]
bytes = "1"
Expand Down Expand Up @@ -98,7 +97,7 @@ x509-parser = "0.18"
# `tls::init_android`); jni is the bridge. Until init runs, verification falls
# back to the bundled Mozilla roots.
jni = "0.22"
tracing-android = { version = "0.2", optional = true }
tracing-android = "0.2"
webpki-roots = "1"

[target.'cfg(unix)'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions rs/moq-tokio/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ impl Log {

// On Android, route logs to logcat so they can be inspected via ADB/Android Studio.
// Everywhere else, format to stderr.
#[cfg(all(target_os = "android", feature = "android-logcat"))]
#[cfg(target_os = "android")]
let registry = {
let logcat_layer = tracing_android::layer("MoQNative")
.map_err(|e| crate::Error::Logcat(std::sync::Arc::new(e)))?
.with_filter(filter);
registry.with(logcat_layer)
};

#[cfg(not(all(target_os = "android", feature = "android-logcat")))]
#[cfg(not(target_os = "android"))]
let registry = {
let fmt_layer = tracing_subscriber::fmt::layer()
.with_writer(std::io::stderr)
Expand Down
Loading