Requirements
Minimum Supported Rust Version (MSRV): 1.77When upgrading the MSRV, make sure to update the CI workflows accordingly.
Add to Your Project
Addstremio-core to your Cargo.toml:
Cargo.toml
Using a Specific Git Commit
To use the latest development version:Cargo.toml
Feature Flags
Stremio Core provides several optional feature flags to customize functionality:env-future-send
Adds the Send marker trait to the Env trait methods and EnvFuture.
Cargo.toml
derive
Exports the Model derive macro from stremio-derive.
Cargo.toml
Model trait:
Without the
derive feature, you’ll need to manually implement the Model trait or depend on stremio-derive separately.analytics
Enables core analytics functionality.
Cargo.toml
- Adds the
analyticsmodule to the public API - Enables analytics tracking in the runtime
- Provides
Env::analytics_context()andEnv::flush_analytics()methods
deflate
Enables deflate compression in official add-ons.
Cargo.toml
Multiple Features
You can combine multiple features:Cargo.toml
Platform-Specific Configuration
Depending on your target platform, you may need different configurations:- Desktop Application
- WebAssembly
- Mobile (iOS/Android)
Cargo.toml
Verify Installation
Create a simple test to verify the installation:src/main.rs
Development Tools
For development, you may also want these tools:rustfmt.toml- Code formatting rulesclippy.toml- Linting rules
Release Configuration
The default release profile in Stremio Core is optimized for size:Cargo.toml
lto = true: Enables Link Time Optimization for better dead code eliminationopt-level = 's': Optimizes for size rather than speed
Cargo.toml if needed:
Cargo.toml
Troubleshooting
Compile error about Send trait in WASM
Compile error about Send trait in WASM
Error:
Send is not implemented for a type when building for WASM.Solution: Remove the env-future-send feature from your dependencies:MSRV compatibility issues
MSRV compatibility issues
Error: Compilation fails with older Rust versions.Solution: Update Rust to version 1.77 or later:
Missing Model macro
Missing Model macro
Error:
cannot find derive macro Model in this scopeSolution: Enable the derive feature:Next Steps
Quickstart Guide
Learn how to build your first application with Stremio Core
