Stremio Core is the Rust engine that powers Stremio’s apps by centralizing all reusable logic behind discovery, catalogs, metadata, streams, add-ons, and user/library state. It exposes a clean set of modules—types, addon_transport, and state_types—so apps can talk to add-ons, model UI state, and react to events without duplicating code. The architecture is inspired by Elm: immutable state, message-driven updates, and explicit side-effects (“effects”) keep behavior predictable and testable. An environment abstraction lets hosts provide implementations for things like storage, networking, and timers, making the core portable to desktop, mobile, and web. The project targets WebAssembly as well, so the same Rust logic can run inside the browser via a small bridge layer.
Features
- Unified Rust engine for catalogs, streams, metadata, and library state
- Elm-style state machine with actions, effects, and update loop
- Add-on transport with legacy protocol adapters and type-safe models
- Environment trait to plug in storage, fetch, and runtime specifics
- WebAssembly target with a bridge package for browser apps
- First-class models for Context (auth/add-ons), Library, Discover, and Meta Details