No description
  • Rust 98.9%
  • Shell 0.8%
  • Dockerfile 0.3%
Find a file
Salix fa75a4f84e
All checks were successful
Build Android Core Package / android-core (push) Successful in 10m18s
Bump version to 1.0.1
2026-07-08 16:06:52 +02:00
.forgejo/workflows Update Git forge host references 2026-07-08 15:34:53 +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 Track Invidious companion backend selectors 2026-07-08 15:13:24 +02:00
.gitignore Remove generated core bindings 2026-07-08 01:08:09 +02:00
Cargo.lock Bump version to 1.0.1 2026-07-08 16:06:52 +02:00
Cargo.toml Bump version to 1.0.1 2026-07-08 16:06:52 +02:00
README.md Remove generated core bindings 2026-07-08 01:08:09 +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 bindings are build artifacts, not checked-in source. The Forgejo workflow builds an Android core package containing generated Kotlin bindings plus native libraries.

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

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

To build the same Android package locally:

scripts/dbuild-android-package.sh

After changing the Rust public API, regenerate/package bindings and update consuming app repositories as needed.

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.