# StickUp
> ๐ **Update: v0.2.1 is here!**
> StickUp v0.2.1 adds per-frame input snapshots, intuitive binding resolution (`"joy0.axis1"`), and cleaner device control with `DeviceManager`.
> Built to scale with sim rigs, overlays, game engines, and beyond.
๐ Already over **1,000 downloads in under 48 hours** โ huge thanks to everyone testing, sharing, and supporting the launch!
[](https://crates.io/crates/stickup)
[](https://crates.io/crates/stickup)
[](https://discord.gg/EKeBNYnaSh)
[](https://ko-fi.com/belegrades)
[](https://x.com/BelegradeOfRuin)
---
## ๐ฎ What is StickUp?
**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**
---
## ๐ Security Note
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.
---
## โจ Features
- ๐ Plug-and-play device management via `DeviceManager`
- ๐ฎ Unified `Device` trait for axis + button input
- ๐ง Persistent device identity (hardware fingerprinting)
- ๐งฐ Binding resolution like `"joy0.axis1"` โ `Option<f32>`
- ๐ Snapshot-based polling and input state tracking
- ๐ง Hotplug-friendly and fully extendable
- ๐ Supports `hid` and `virtual` backends via optional features
- ๐ก Zero magic โ minimal, intentional design
---
## ๐งญ Philosophy
StickUp 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.
---
## ๐ฆ Installation
```toml
stickup = { version = "0.2.1", features = ["hid", "virtual"] }
```
---
<details>
<summary>๐ฆ Quick Start & Snapshot Example</summary>
```rust
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" });
}
}
}
```
</details>
---
## ๐งฌ Device Identity
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.
---
## ๐ Examples
Run any with:
```sh
cargo run --example <name>
```
- `poll` โ Print a full snapshot of all input state
- `virtual_demo` โ Feed input into a simulated virtual device
---
## ๐ ๏ธ Optional Features
| `hid` (default) | Enables HID device support via `hidapi` |
| `virtual` | Enables manually fed virtual devices |
---
## ๐ฎ Coming Next: Event Listeners
StickUp currently uses snapshot-based polling for simplicity and determinism.
> Next release will introduce **event listener support**:
> Low-latency, per-device events that let you respond to input as it happens โ perfect for overlays, sim triggers, and reactive UIs.
Example:
```rust
device.add_listener(Arc::new(MyEventHandler));
```
This will **coexist** with polling โ giving you full control and flexibility.
---
## ๐ License
This project is licensed under the **Pact of the Amaranth Rite**.
See [`LICENSE`](./LICENSE) for details.
### Third-Party Dependencies
- [`hidapi`](https://github.com/libusb/hidapi) โ MIT/Apache-2.0 (HID support)
- [`serde`](https://github.com/serde-rs/serde) โ MIT/Apache-2.0 (serialization)
- [`serde_json`](https://github.com/serde-rs/json) โ MIT/Apache-2.0 (layout/config IO)
- [`toml`](https://github.com/alexcrichton/toml-rs) โ MIT/Apache-2.0 (if config parsing used)
---
## ๐ฌ Connect
- โ๏ธ Email: [belegrade@belegrades.gg](mailto:belegrade@belegrades.gg)
- ๐ฌ Discord: [Join the Chat](https://discord.gg/EKeBNYnaSh)
- ๐ฎ Sim pilots & devs: Iโd love to hear how youโre using StickUp.