From aa07984631cfe1935a0a2e069edfc3021d754ba2 Mon Sep 17 00:00:00 2001 From: Kayos Date: Sun, 24 May 2026 17:40:37 -0700 Subject: [PATCH] Drop cdylib + staticlib from strawcore-core crate-type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Caught during the cargo-ndk cross-compile — strawcore-core was emitting its own libstrawcore_core.so (~306 KB per ABI) into Straw's jniLibs. That .so is never loaded by Android; the wrapper crate's libstrawcore.so is the only entry point. rlib only is what consumer crates need. --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 477bf40..c220572 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,11 @@ repository = "http://192.168.0.5:3001/Sulkta-Coop/strawcore" description = "Rust port of NewPipeExtractor (YT-only). Plugs into Straw via UniFFI." [lib] -crate-type = ["rlib", "cdylib", "staticlib"] +# rlib only — strawcore-core is consumed as a Rust library, NOT loaded +# directly by Android. The Straw wrapper crate is the cdylib + the +# .so Android calls System.loadLibrary("strawcore") for. Emitting a +# cdylib here too just bloats jniLibs by ~300 KB per ABI. +crate-type = ["rlib"] [dependencies] reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-webpki-roots", "blocking", "gzip"] }