MCPcopy Index your code
hub / github.com/Stremio/stremio-core

github.com/Stremio/stremio-core @stremio-core-web-v0.59.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release stremio-core-web-v0.59.0 ↗ · + Follow
1,164 symbols 3,059 edges 240 files 46 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Stremio - the next generation media center

Build Workflow Status Latest MSRV workflow Status Latest deployed docs on GH pages

Stremio is a full-featured media center designed to help you organize and stream your favorite videos, movies and TV series. It will notify you for new episodes / movies, and allow you to find new content through Discover.

Stremio allows, using its Add-ons system, to play movies, TV series and channels instantly.

stremio-core

stremio-core is a rust crate that's designed to contain all the reusable logic between Stremio versions.

Goals

  • Flexibility - can be integrated into existing code bases, across the entire stack, and in different paradigms
    • use case: types can be used by add-ons
    • use case: can be used with existing user authentication as an addition to an existing app
    • use case: can use the Context model to manage the user authentication/addons, using it as a backbone to the entire Stremio app
  • Emphasis on correctness
  • No cruft / legacy - not burdened by obsolete decisions & solutions

Modules

  • types
  • addon_transport - handles communication with add-ons, implements legacy protocol adapter
  • state_types: types that describe application state; inspired by the Elm architecture
    • Effects and Update traits
    • runtime: helps using stremio-core in an application by handling the effects automatically
    • environment: a trait describes the environment (fetch, storage)
    • msg: messages: actions, events
    • models: all stateful models, such as Context (handling user authentication, add-ons), Library, CatalogFiltered, etc.
cargo clippy
cargo fmt

Optimizing WASM output

WASM output binary can get large, especially if we derive Serialize/Deserialize in places we don't need to

We can optimize it by running twiggy: twiggy top ..._bg.wasm and seeing what the biggest code size offenders are

Adding new actions

Defining actions and what middleware requests they should trigger is defined in src/state_types/msg/actions

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 466
Class 324
Method 290
Enum 65
Interface 19

Languages

Rust100%
TypeScript1%

Modules by API surface

src/runtime/env.rs61 symbols
src/types/resource/stream.rs37 symbols
src/models/player.rs25 symbols
src/models/streaming_server.rs24 symbols
stremio-core-web/src/env.rs23 symbols
src/types/api/response.rs23 symbols
stremio-watched-bitfield/src/watched_bitfield.rs22 symbols
src/types/resource/meta_item.rs22 symbols
src/types/addon/manifest.rs22 symbols
src/models/library_with_filters.rs20 symbols
src/models/catalog_with_filters.rs19 symbols
src/addon_transport/http_transport/legacy/mod.rs19 symbols

For agents

$ claude mcp add stremio-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page