sleeyax/stremio-addon-sdk-rs

Stremio addon SDK using rust, stremio-core and hyper

20

stars

53

commits

Rust

primary language

Jun 14, 2024

updated

README

Stremio Addon SDK

Rust version of the stremio-addon-sdk using stremio-core

This is an unofficial SDK for building stremio addons. If you're totally new to addon building, it's recommended to start reading the offical stremio addon SDK docs to get a basic understanding of how addons work. This SDK is meant to step up your game if you want to make use of Rust's powerfull type system and performance.

[!WARNING]
This project is in low-maintenance mode. I will still accept PRs but likely won't contribute much to the project myself.

Getting started

use stremio_addon_sdk::builder::Builder;
use stremio_addon_sdk::server::{serve_http, ServerOptions};

#[tokio::main]
async fn main() {
    // create manifest file using stremio-core's Manifest struct
    let manifest = Manifest {
        // ...
    };

    // build addon interface
    let interface = Builder::new(manifest)
        // function as parameter
        .define_catalog_handler(handle_catalog)
        .define_stream_handler(handle_stream)
        // closure as parameter
        .define_meta_handler(|resource: &ResourceRef| -> EnvFuture<ResourceResponse> {
            let response = ResourceResponse::Metas { metas: vec![] };
            return Box::new(future::ok(response));
        })
        .build();

    // run HTTP server with default settings
    serve_http(interface, ServerOptions::default());
}

See the example-addon for more details or take a look at the documentation.

FAQ

  • How do I host my addon?
  • Why would I use this over the official SDK?
    • You tell me. Types, speed & stremio-core are my reasons ;)
  • How do I publish my addon?
    • Use this website to publish your addon to the public Stremio addon collection.

Documentation

Documentation can be found here.

If you're a gopher, check out the Stremio addon SDK for Go (caution: this project seems to be no longer maintained).

Contributors

sleeyax

47 commits

MartinKavik

6 commits

sleeyax/stremio-addon-sdk-rs

Stremio addon SDK using rust, stremio-core and hyper

20

stars

53

commits

Rust

primary language

Jun 14, 2024

updated

README

Stremio Addon SDK

Rust version of the stremio-addon-sdk using stremio-core

This is an unofficial SDK for building stremio addons. If you're totally new to addon building, it's recommended to start reading the offical stremio addon SDK docs to get a basic understanding of how addons work. This SDK is meant to step up your game if you want to make use of Rust's powerfull type system and performance.

[!WARNING]
This project is in low-maintenance mode. I will still accept PRs but likely won't contribute much to the project myself.

Getting started

use stremio_addon_sdk::builder::Builder;
use stremio_addon_sdk::server::{serve_http, ServerOptions};

#[tokio::main]
async fn main() {
    // create manifest file using stremio-core's Manifest struct
    let manifest = Manifest {
        // ...
    };

    // build addon interface
    let interface = Builder::new(manifest)
        // function as parameter
        .define_catalog_handler(handle_catalog)
        .define_stream_handler(handle_stream)
        // closure as parameter
        .define_meta_handler(|resource: &ResourceRef| -> EnvFuture<ResourceResponse> {
            let response = ResourceResponse::Metas { metas: vec![] };
            return Box::new(future::ok(response));
        })
        .build();

    // run HTTP server with default settings
    serve_http(interface, ServerOptions::default());
}

See the example-addon for more details or take a look at the documentation.

FAQ

  • How do I host my addon?
  • Why would I use this over the official SDK?
    • You tell me. Types, speed & stremio-core are my reasons ;)
  • How do I publish my addon?
    • Use this website to publish your addon to the public Stremio addon collection.

Documentation

Documentation can be found here.

If you're a gopher, check out the Stremio addon SDK for Go (caution: this project seems to be no longer maintained).

Contributors

sleeyax

47 commits

MartinKavik

6 commits

Languages

Rust

92.3%

CSS

7.6%