#usb #serial #hardware #bluetooth #teledildonics

macro buttplug_derive

Trait Derive Macros for Buttplug Intimate Hardware Control Library

6 releases (breaking)

0.5.0 Oct 16, 2020
0.4.0 Jul 27, 2020
0.3.0 Jun 22, 2020
0.2.0 Apr 14, 2020
0.0.1 Nov 3, 2019

#218 in Hardware support

Download history 9/week @ 2020-07-06 12/week @ 2020-07-13 9/week @ 2020-07-20 88/week @ 2020-07-27 90/week @ 2020-08-03 21/week @ 2020-08-10 64/week @ 2020-08-17 24/week @ 2020-08-24 54/week @ 2020-08-31 170/week @ 2020-09-07 87/week @ 2020-09-14 85/week @ 2020-09-21 115/week @ 2020-09-28 160/week @ 2020-10-05 98/week @ 2020-10-12 62/week @ 2020-10-19

330 downloads per month
Used in 3 crates (via buttplug)

BSD-3-Clause

10KB
214 lines

Buttplug (Rust Implementation)

Patreon donate button Github donate button Discourse Forum Discord Twitter

Crates.io Version Crates.io Downloads Crates.io License

Rust implementation of the Buttplug Intimate Hardware Protocol, including implementations of the client and, at some point, server.

Read Me First!

If you are new to Buttplug, you most likely want to start with the Buttplug Website or the Buttplug Core Repo.

For a demo of what this framework can do, check out this demo video.

Buttplug-rs is a full fledged implementation of Buttplug, on par with our C# and Javascript/Typescript implementations.

Buttplug-rs is currently capable of controlling:

  • Some Bluetooth LE toys (See IOSTIndex for more info)
  • XInput gamepads (Windows only)

Introduction

Buttplug is a framework for hooking up hardware to interfaces, where hardware usually means sex toys, but could honestly be just about anything. It's basically a userland HID manager for things that may not specifically be HID.

In more concrete terms, think of Buttplug as something like osculator or VRPN, but for sex toys. Instead of wiimotes and control surfaces, we interface with vibrators, electrostim equipment, fucking machines, and other hardware that can communicate with computers.

The core of buttplug works as a router. It is a Rust based application that connects to libraries that registers and communicates with different hardware. Clients can then connect over websockets or network ports, to claim and interact with the hardware.

Usage

To use Buttplug in your rust application or library, check out the buttplug package on crates.io.

The following crate features are available

Feature Other Features Used Description
client None Buttplug client implementation (in-process connection only)
server None Buttplug server implementation (in-process connection only)
serialize_json None Serde JSON serializer for Buttplug messages, needed for remote connectors
client-ws client,serialize_json Websocket client connector, used to connect clients to remote servers
client-ws-ssl client,serialize_json Websocket client connector with SSL capabilities
btleplug-manager None Bluetooth hardware support on Windows, Mac, Linux, iOS
xinput None XInput Gamepad support on windows

Default features are client, server, serialize_json, client-ws-ssl, btleplug-manager, and xinput (feature is only relevant on windows, but builds as a noop on all other platforms).

Building on Windows

In order to build with Websocket support on windows, OpenSSL is required. To build with OpenSSL, use the following commands in cmd (Powershell will require different commands):

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg.bat -disableMetrics
vcpkg install openssl:x64-windows
set VCPKGRS_DYNAMIC=1
cd ..\buttplug-rs\buttplug
cargo test --features client-ws-ssl,winrt-ble

If you have issues getting this to build, please file an issue.

Contributing

Right now, we mostly need code/API style reviews and feedback. We don't really have any good bite-sized chunks to mentor the implementation yet, but one we do, those will be marked "Help Wanted" in our github issues.

License

Buttplug is BSD licensed.

Copyright (c) 2016-2019, Nonpolynomial Labs, LLC
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of buttplug nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Dependencies

~0.4–0.8MB
~20K SLoC