buttplug/lib.rs
1// Buttplug Rust Source Code File - See https://buttplug.io for more info.
2//
3// Copyright 2016-2024 Nonpolynomial Labs LLC. All rights reserved.
4//
5// Licensed under the BSD 3-Clause license. See LICENSE file in the project root
6// for full license information.
7
8#![crate_type = "lib"]
9#![crate_name = "buttplug"]
10#![doc = include_str!("../README.md")]
11
12//! # An Overview of Buttplug's Module System
13//!
14//! Buttplug is broken up into the following modules:
15//!
16//! - [Core](crate::core)
17//! - Generic portions of the library code that are used by the other modules. This includes
18//! message classes, serializers, connectors, and errors.
19//! - [Client](crate::client)
20//! - The public facing API for applications. This module is what most programs will use to talk
21//! to Buttplug servers, either directly through Rust, or through our [FFI
22//! Layer](https://github.com/buttplugio/buttplug-rs-ffi) for other languages.
23//! - [Server](crate::server)
24//! - Handles actual hardware connections and communication. If you want to add new devices or
25//! protocols to Buttplug, or change how the system access devices, this is the module you'll be
26//! working in.
27//! - [Util](crate::util)
28//! - Utilities for all portions of the library that may not be specifically related to sex toy
29//! functionality. This includes managers for different async runtimes, configuration file
30//! loading, utilities for streams and futures, etc...
31
32#[macro_use]
33extern crate buttplug_derive;
34#[macro_use]
35extern crate strum_macros;
36#[cfg(any(feature = "client", feature = "server"))]
37#[macro_use]
38extern crate futures;
39#[macro_use]
40extern crate tracing;
41
42#[cfg(feature = "client")]
43pub mod client;
44pub mod core;
45#[cfg(feature = "server")]
46pub mod server;
47pub mod util;