Crates.io | stickup |
lib.rs | stickup |
version | 0.2.9 |
created_at | 2025-05-14 23:23:51.092301+00 |
updated_at | 2025-07-06 03:32:39.883536+00 |
description | A modular input device abstraction layer with HID and virtual device support. |
homepage | |
repository | https://gitlab.com/belegrades/stickup-rs |
max_upload_size | |
id | 1674099 |
size | 39,867 |
๐ Update: v0.2.9 is here!
StickUp v0.2.9 adds:
InputEventBus
supporting listener registration, filtering, and dispatch.EventFilter
and FilteredListener
.Logger
for debugging input streams.DeviceManager
for automatic event emission on polling and snapshot.Built to scale with sim rigs, overlays, game engines, and beyond.
๐ Huge thanks to everyone testing and sharing! Your support means the world to me. -Bel
StickUp is a modular, high-performance input framework for Rust.
It supports both real HID devices and virtual inputs with clarity, precision, and stability.
Part of the CelerisTech stack by Belegrade Studio
The name stickup was previously used in 2023 for a malicious crate that has since been removed from crates.io.
This version โ authored by Belegrade Studio โ is a clean and fully rewritten project, unrelated to the original.
โ No
build.rs
โ No network activity
โ 100% open and auditable
Transparency matters. Feel free to inspect the source or reach out directly.
DeviceManager
Device
trait for axis + button input"joy0.axis1"
โ Option<f32>
hid
and virtual
backends via optional featuresStickUp is about presence, clarity, and persistence.
It doesnโt guess. It doesnโt simulate. It reflects exactly what your device is doing โ no more, no less.
stickup = { version = "0.2.1", features = ["hid", "virtual"] }
use stickup::DeviceManager;
fn main() {
let mut input = DeviceManager::new();
input.snapshot(); // poll + build snapshot
if let Some(throttle) = input.get_axis("joy0.throttle") {
println!("Throttle: {:.2}", throttle);
}
if input.is_pressed("joy1.trigger") {
println!("Trigger is pressed!");
}
// Full snapshot usage
let state = input.snapshot();
for (id, device_state) in state.iter() {
println!("Device: {id}");
for (axis, value) in &device_state.axes {
println!(" Axis {axis}: {value:.2}");
}
for (button, pressed) in &device_state.buttons {
println!(" Button {button}: {}", if *pressed { "Pressed" } else { "Released" });
}
}
}
StickUp assigns a stable, persistent ID to each device:
vendor_id:product_id:serial_number
# Example: 044f:0402:ABCD1234
This allows for consistent bindings across reboots and USB port changes.
Run any with:
cargo run --example <name>
poll
โ Print a full snapshot of all input statevirtual_demo
โ Feed input into a simulated virtual deviceFeature | Description |
---|---|
hid (default) |
Enables HID device support via hidapi |
virtual |
Enables manually fed virtual devices |
The next update will include a complete and functional input parser to ensure compatability with everything from a simple arcade style joysticks to full HOSAS equipped sim-rigs.
This project is licensed under the Pact of the Amaranth Rite.
See LICENSE
for details.
hidapi
โ MIT/Apache-2.0 (HID support)serde
โ MIT/Apache-2.0 (serialization)serde_json
โ MIT/Apache-2.0 (layout/config IO)toml
โ MIT/Apache-2.0 (if config parsing used)