[PR #18] [MERGED] Rust fixes #28

Closed
opened 2026-10-15 12:51:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/inputtino/pull/18
Author: @hgaiser
Created: 1/12/2025
Status: ✅ Merged
Merged: 3/3/2025
Merged by: @ABeltramo

Base: stable ← Head: rust-fixes


📝 Commits (10+)

  • 28d3fe7 feat: better Rust bindings, properly wrapped mouse
  • 639cecc fix: absolute mouse, remove hardcoded name
  • f450266 fix: absolute mouse, remove hardcoded name
  • f812746 feat: completed Rust mouse API + tests
  • d216136 feat: completed Rust keyboard API + tests
  • 264fe97 feat: added pkgconfig configuration
  • da41b6b feat: allow Rust build when using the shared library
  • aa3f1fd feat: added basic Dockerfile for compiling from scratch
  • 41314dc feat: added xbox joypad, separated c_bindings
  • e3e74fe feat: added switch joypad

📊 Changes

36 files changed (+1687 additions, -142 deletions)

View changed files

📝 .dockerignore (+5 -0)
➕ .github/workflows/rust.yml (+40 -0)
📝 CMakeLists.txt (+7 -0)
📝 README.md (+29 -1)
📝 bindings/rust/Cargo.toml (+6 -15)
➖ bindings/rust/build.rs (+0 -64)
➕ bindings/rust/inputtino-sys/.dockerignore (+1 -0)
➕ bindings/rust/inputtino-sys/Cargo.toml (+12 -0)
➕ bindings/rust/inputtino-sys/build.rs (+46 -0)
➕ bindings/rust/inputtino-sys/src/lib.rs (+5 -0)
📝 bindings/rust/inputtino-sys/wrapper.h (+0 -0)
➕ bindings/rust/inputtino/.dockerignore (+1 -0)
➕ bindings/rust/inputtino/Cargo.toml (+18 -0)
➕ bindings/rust/inputtino/examples/keyboard.rs (+33 -0)
➕ bindings/rust/inputtino/examples/mouse.rs (+17 -0)
➕ bindings/rust/inputtino/src/common.rs (+113 -0)
➕ bindings/rust/inputtino/src/error.rs (+15 -0)
➕ bindings/rust/inputtino/src/joypad.rs (+74 -0)
➕ bindings/rust/inputtino/src/joypad_nintendo.rs (+135 -0)
➕ bindings/rust/inputtino/src/joypad_ps5.rs (+204 -0)

...and 16 more files

📄 Description

This PR does the following:

  1. Pull in the latest changes from stable branch.
  2. Fix static lib compilation for Rust binding.
  3. Change Rust binding to default to static library compilation (to make it feel more Rusty?).
  4. Rename Rust binding to inputtino, instead of inputtino_rs.
  5. Removed a bunch of Inputtino prefixes in the Rust binding.
  6. Add an abstract Joypad enum that is similar to Joypad in the C++ API.
  7. Add impl Send for Rust binding objects.
  8. Add Rust binding for PS5 joypad.
  9. ⚠️ Rename inputtino_joypad_ps5_set_led to inputtino_joypad_ps5_set_on_led (since it sets a callback, it doesn't set the LED like the name suggested). This is the only change that changes any of the other APIs.

The tests don't pass currently, but this was already the case before I made any changes. I do still want to look into that.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/inputtino/pull/18 **Author:** [@hgaiser](https://github.com/hgaiser) **Created:** 1/12/2025 **Status:** ✅ Merged **Merged:** 3/3/2025 **Merged by:** [@ABeltramo](https://github.com/ABeltramo) **Base:** `stable` ← **Head:** `rust-fixes` --- ### 📝 Commits (10+) - [`28d3fe7`](https://github.com/games-on-whales/inputtino/commit/28d3fe77813780c38c67fb1e8548e1b6321cd27c) feat: better Rust bindings, properly wrapped mouse - [`639cecc`](https://github.com/games-on-whales/inputtino/commit/639ceccbc80329f2c4746cfc3ba9320a42ec583b) fix: absolute mouse, remove hardcoded name - [`f450266`](https://github.com/games-on-whales/inputtino/commit/f450266046157c66aab97de4c350ca9df2eb438f) fix: absolute mouse, remove hardcoded name - [`f812746`](https://github.com/games-on-whales/inputtino/commit/f8127465fd7ce8e534e3fa0250ce095007ed0dd9) feat: completed Rust mouse API + tests - [`d216136`](https://github.com/games-on-whales/inputtino/commit/d2161365f98805addff02ec98050950f7c605067) feat: completed Rust keyboard API + tests - [`264fe97`](https://github.com/games-on-whales/inputtino/commit/264fe9703492654342253c81b02d91bdd0e50dff) feat: added pkgconfig configuration - [`da41b6b`](https://github.com/games-on-whales/inputtino/commit/da41b6b22821086f3de9c7a8078fb64a503b92fa) feat: allow Rust build when using the shared library - [`aa3f1fd`](https://github.com/games-on-whales/inputtino/commit/aa3f1fd46c72ca3ddcabca2a5aaf805a3c8d5826) feat: added basic Dockerfile for compiling from scratch - [`41314dc`](https://github.com/games-on-whales/inputtino/commit/41314dcee490f8f79362c47bc1bb6240b52003cf) feat: added xbox joypad, separated c_bindings - [`e3e74fe`](https://github.com/games-on-whales/inputtino/commit/e3e74febc9046ffd86d52e2ea08fed05e1dd2dd0) feat: added switch joypad ### 📊 Changes **36 files changed** (+1687 additions, -142 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+5 -0) ➕ `.github/workflows/rust.yml` (+40 -0) 📝 `CMakeLists.txt` (+7 -0) 📝 `README.md` (+29 -1) 📝 `bindings/rust/Cargo.toml` (+6 -15) ➖ `bindings/rust/build.rs` (+0 -64) ➕ `bindings/rust/inputtino-sys/.dockerignore` (+1 -0) ➕ `bindings/rust/inputtino-sys/Cargo.toml` (+12 -0) ➕ `bindings/rust/inputtino-sys/build.rs` (+46 -0) ➕ `bindings/rust/inputtino-sys/src/lib.rs` (+5 -0) 📝 `bindings/rust/inputtino-sys/wrapper.h` (+0 -0) ➕ `bindings/rust/inputtino/.dockerignore` (+1 -0) ➕ `bindings/rust/inputtino/Cargo.toml` (+18 -0) ➕ `bindings/rust/inputtino/examples/keyboard.rs` (+33 -0) ➕ `bindings/rust/inputtino/examples/mouse.rs` (+17 -0) ➕ `bindings/rust/inputtino/src/common.rs` (+113 -0) ➕ `bindings/rust/inputtino/src/error.rs` (+15 -0) ➕ `bindings/rust/inputtino/src/joypad.rs` (+74 -0) ➕ `bindings/rust/inputtino/src/joypad_nintendo.rs` (+135 -0) ➕ `bindings/rust/inputtino/src/joypad_ps5.rs` (+204 -0) _...and 16 more files_ </details> ### 📄 Description This PR does the following: 1. Pull in the latest changes from `stable` branch. 2. Fix static lib compilation for Rust binding. 3. Change Rust binding to default to static library compilation (to make it feel more Rusty?). 4. Rename Rust binding to `inputtino`, instead of `inputtino_rs`. 5. Removed a bunch of `Inputtino` prefixes in the Rust binding. 6. Add an abstract `Joypad` enum that is similar to `Joypad` in the C++ API. 7. Add `impl Send` for Rust binding objects. 8. Add Rust binding for PS5 joypad. 9. :warning: Rename `inputtino_joypad_ps5_set_led` to `inputtino_joypad_ps5_set_on_led` (since it sets a callback, it doesn't set the LED like the name suggested). This is the only change that changes any of the other APIs. The tests don't pass currently, but this was already the case before I made any changes. I do still want to look into that. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/inputtino#28
No description provided.