straw/rust/strawcore/Cargo.toml
Kayos 3a57696b46 vc=56 fixup: actually add reqwest+quick-xml+futures to Cargo.toml
Earlier Edit's old_string didn't match the file shape so the dep
additions never landed. Re-adding properly after android_logger.
2026-05-26 10:46:26 -07:00

56 lines
2.5 KiB
TOML

[package]
name = "strawcore"
version = "0.1.0"
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
[lib]
# cdylib — the .so that Android loads via System.loadLibrary("strawcore").
# staticlib — kept in case we ever want to link statically for a benchmark.
crate-type = ["cdylib", "staticlib"]
[dependencies]
# UniFFI generates the Kotlin bindings + the JNI glue. proc-macro mode
# (no .udl file) — annotate Rust fns directly with #[uniffi::export].
# `tokio` feature wires `#[uniffi::export(async_runtime = "tokio")]` so async
# fns surface as suspend fun on the Kotlin side.
uniffi = { version = "0.28", features = ["cli", "tokio"] }
# Tokio multi-thread runtime — needed to host spawn_blocking around the
# blocking strawcore_core HTTP calls so Kotlin `suspend fun` semantics
# survive.
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync"] }
# The actual YT extractor lives in Sulkta-Coop/strawcore. Renamed locally
# to `strawcore_core` to avoid collision with this wrapper crate's name
# (which has to stay `strawcore` so the .so name + Kotlin loadLibrary
# call keep working).
strawcore-core = { path = "../../../strawcore" }
# rquickjs-sys is pulled transitively by strawcore-core → rquickjs. The
# Android target has no pre-generated bindings — flip on the `bindgen`
# feature so cargo regenerates at build time. Direct dep so the feature
# flag propagates (cargo's unified feature resolver lifts this to the
# transitive use). Crafting-table has libclang preinstalled.
rquickjs-sys = { version = "0.11", default-features = false, features = ["bindgen"] }
# Error glue.
thiserror = "1"
# Android log integration — `log::info!()` ends up in `adb logcat -s strawcore`.
log = "0.4"
android_logger = { version = "0.14", default-features = false }
# vc=56 — subscription RSS feed fan-out. reqwest dedupes against
# strawcore-core's already-pulled reqwest; quick-xml is small (~200KB);
# futures for buffer_unordered. rustls-tls avoids the NDK openssl headers
# headache.
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "gzip"] }
quick-xml = "0.36"
futures = "0.3"
[build-dependencies]
uniffi = { version = "0.28", features = ["build"] }
[[bin]]
# Generates Kotlin bindings from the compiled .so:
# cargo run --bin uniffi-bindgen generate --library target/.../libstrawcore.so \
# --language kotlin --out-dir ../../strawApp/src/main/kotlin
name = "uniffi-bindgen"
path = "src/uniffi-bindgen.rs"