No description
  • Rust 37.7%
  • Kotlin 28.2%
  • Swift 26.6%
  • C 7.1%
  • Shell 0.3%
  • Other 0.1%
Find a file
Salix 4ef469422d
All checks were successful
Build Android Core Package / android-core (push) Successful in 9m54s
docs: add project README
2026-07-07 17:08:45 +02:00
.forgejo/workflows ci: use valid package registry secret 2026-07-07 16:49:21 +02:00
bindings Add encrypted sync and watch-time core APIs 2026-07-07 12:12:03 +02:00
docker ci: fix Android core package build on Docker runner 2026-07-07 16:06:48 +02:00
scripts ci: include Kotlin bindings in Android core package 2026-07-07 17:08:34 +02:00
src Add encrypted sync and watch-time core APIs 2026-07-07 12:12:03 +02:00
.gitignore ci: publish Android core package 2026-07-07 15:41:52 +02:00
Cargo.lock Add encrypted sync and watch-time core APIs 2026-07-07 12:12:03 +02:00
Cargo.toml Add encrypted sync and watch-time core APIs 2026-07-07 12:12:03 +02:00
README.md docs: add project README 2026-07-07 17:08:45 +02:00
uniffi-bindgen.rs Add Invidious shared core library 2026-06-21 14:57:37 +02:00

invio-core

invio-core is the shared Rust core for Invio. It contains the reusable product logic used by the platform apps, while Android and GNOME keep their native UI, media playback, WebView/WebKit challenge solving, packaging, and OS integration in their own repositories.

Invio is a personal project for watching and managing YouTube content through configured Invidious instances. The core is where behavior should live when it needs to work the same way across apps.

What It Does

  • Normalizes and orders configured Invidious instances.
  • Tracks instance health and backs off from failing instances.
  • Fetches channel feeds and subscribed-feed pages.
  • Searches videos and channels through Invidious.
  • Resolves playable Invidious streams and watch-page metadata.
  • Detects Invidious challenge/interstitial pages so the host app can solve them in a real web view.
  • Fetches SponsorBlock segments and Return YouTube Dislike counts.
  • Stores subscriptions, watch history, playlists, downloads, settings, and sync state in SQLite.
  • Imports, exports, and syncs user data in formats shared by the platform apps.
  • Exposes the API to Android and future Apple apps through generated uniffi bindings.

Where It Fits

invio-core
  Rust logic, HTTP parsing, persistence, sync, bindings

invio-android
  Jetpack Compose UI, Media3 playback, Android lifecycle, WorkManager, WebView challenges

invio-adwaita
  GTK/libadwaita UI, GStreamer playback, desktop integration, WebKitGTK challenges

Reusable behavior should start here first. Platform repositories should mostly adapt core models to their native UI and OS APIs.

Screenshots

The core has no UI of its own. These screenshots come from the sibling platform shells that consume this crate:

Android foldable preview

Adwaita feed preview

Public API

Most hosts use a single InvioCore object. Kotlin and Swift bindings are generated by uniffi; the Linux app uses the Rust crate directly.

val core = InvioCore()
val instances = listOf("https://inv.nadeko.net", "https://invidious.nerdvpn.de")

val videos = core.fetchFeed("UC_x...", instances, allowYouTubeFallback = true)
val streams = core.resolveStreams("dQw4w9WgXcQ", instances, apiEnabledBaseUrls = listOf())
val segments = core.fetchSponsorSegments("dQw4w9WgXcQ", listOf(SponsorCategory.SPONSOR))

When a call returns a challenge error, the host app opens the challenge URL in WebView/WebKit, passes the solved cookies back to the core, then retries the original request.

Building

cargo test
cargo test --no-default-features
cargo build --release

Generated Kotlin and Swift bindings are checked in under bindings/.

To rebuild Android native libraries and write them into the sibling Android app:

ANDROID_NDK_HOME=/path/to/android-ndk scripts/build-android.sh

After changing the Rust public API, regenerate bindings and update the consuming app repositories.

Project Status

This is a personal project. It is built for the author's own use and experimentation, so it does not come with warranty, support commitments, compatibility guarantees, or release promises.

Source Availability

The code is currently source available for reading and reference. It is not open source licensed. Unless a separate license is added, no permission is granted to reuse, redistribute, or relicense the code.