Crates.io | streamdeck-oxide |
lib.rs | streamdeck-oxide |
version | |
source | src |
created_at | 2025-04-06 23:09:59.740918+00 |
updated_at | 2025-04-13 21:20:12.198307+00 |
description | A high-level framework for creating Stream Deck applications in Rust |
homepage | |
repository | https://github.com/skdziwak/streamdeck-oxide |
max_upload_size | |
id | 1623482 |
Cargo.toml error: | TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A high-level framework for creating Stream Deck applications in Rust.
Add this to your Cargo.toml
:
[dependencies]
streamdeck-oxide = "0.1.4"
Or if you want to use plugins:
[dependencies]
streamdeck-oxide = { version = "0.1.4", features = ["plugins"] }
libudev
is required for HID support. You can install it using your package
manager. flake.nix
with a dev shell is provided for development.
The library provides two main approaches for building Stream Deck applications:
For simple applications, you can use the standard approach with a custom navigation structure:
// See the full example in examples/simple/src/main.rs
use streamdeck_oxide::{
button::RenderConfig, navigation::NavigationEntry, run_with_external_triggers,
view::customizable::CustomizableView, // ...and more imports
};
// Define your application context
struct AppContext {
message: String,
}
// Define your navigation structure
enum Navigation {
Main,
Settings,
// ...other views
}
// Implement NavigationEntry to define your views
impl NavigationEntry<U5, U3, AppContext> for Navigation {
fn get_view(&self) -> Result<Box<dyn View<U5, U3, AppContext, Navigation>>, Box<dyn std::error::Error>> {
// Create and return views based on navigation state
}
}
// Run your application
run_with_external_triggers::<Navigation, U5, U3, AppContext>(
theme, config, deck, context, receiver
).await?;
For the complete example, see examples/simple/src/main.rs.
For more complex applications, you can use the plugin system to create modular, extensible applications:
// See the full example in examples/plugins/src/main.rs
use streamdeck_oxide::{
plugins::{Plugin, PluginContext, PluginNavigation}, // Plugin system imports
// ...other imports
};
// Define your plugin
pub struct AppPlugin;
impl Plugin<U5, U3> for AppPlugin {
fn name(&self) -> &'static str {
"AppPlugin"
}
fn get_view(&self) -> Result<Box<dyn View<U5, U3, PluginContext, PluginNavigation<U5, U3>>>, Box<dyn std::error::Error>> {
// Create and return a view for this plugin
}
}
// Create and run your plugin-based application
let context = PluginContext::new(/* your shared context */);
run_with_external_triggers::<PluginNavigation<U5, U3>, U5, U3, PluginContext>(
theme, config, deck, context, receiver
).await?;
For the complete plugin example, see examples/plugins/src/main.rs.
The plugin system offers several advantages:
For more detailed documentation, see the API documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is using Roboto font for rendering text. The font files are
included in the fonts
directory. Roboto is licensed under the Apache License.
See the
LICENSE-ROBOTO file
for details.