7 stable releases

1.3.1 Aug 26, 2024
1.2.0 Aug 21, 2024
1.0.2 Jul 31, 2024

#268 in Hardware support

Download history 209/week @ 2024-07-22 126/week @ 2024-07-29 96/week @ 2024-08-05 142/week @ 2024-08-12 148/week @ 2024-08-19 292/week @ 2024-08-26

681 downloads per month

Apache-2.0

84KB
1K SLoC

libmapper-rs

Rust wrapper for the libmapper C library. Allows creation and manipulation of libmapper signals and devices.

Compatibility

Below is a table of the libmapper-rs versions and the libmapper versions they are compatible with.

libmapper-rs libmapper
1.0.0-1.1.0 2.4.7
1.1.0-1.3.1 2.4.9

Notes

  • Libmapper 2.4.9 has a bug causing the pointer to object IDs to be unaligned. This causes rust to panic when calling get_property to get the ID. Turning on release optimizations will mitigate this as it skips rust's alignment check.

lib.rs:

libmapper-rs

libmapper is a cross-platform library for connecting data sources to synthesizers, DAWs, and other hardware or software devices. It provides a simple API for creating and managing signals, devices, and mappings between them.

This project contains safe, idiomatic rust bindings to the libmapper C api.

Concepts

Devices

Libmapper operates on a shared peer-to-peer graph. A Device represents a connection to this graph and is a container for signals.

Most libmapper code will start by creating a device and polling until it becomes ready, like so:

use libmapper_rs::device::Device;
fn main() {
    let mut device = Device::create("CoolDevice");
    loop {
      device.poll_and_block(std::time::Duration::from_millis(10));
      if device.is_ready() {
         break;
        }
    }
    println!("Device is ready!");
    // create signals, maps, etc.
}

No runtime deps