#low-level #midi #framework #macos #ffi #macos-framework

sys coremidi-sys

Low-level FFI bindings for the CoreMIDI framework

8 stable releases

Uses old Rust 2015

3.2.0 May 29, 2025
3.1.1 Jun 11, 2024
3.1.0 Mar 11, 2022
3.0.1 Jun 14, 2021
1.0.0 Dec 13, 2016

#207 in Audio

Download history 604/week @ 2025-06-01 873/week @ 2025-06-08 1077/week @ 2025-06-15 2037/week @ 2025-06-22 1085/week @ 2025-06-29 1644/week @ 2025-07-06 2270/week @ 2025-07-13 2860/week @ 2025-07-20 2006/week @ 2025-07-27 1968/week @ 2025-08-03 2147/week @ 2025-08-10 2648/week @ 2025-08-17 1985/week @ 2025-08-24 1898/week @ 2025-08-31 2271/week @ 2025-09-07 1839/week @ 2025-09-14

8,383 downloads per month
Used in 77 crates (via coremidi)

MIT license

44KB
1.5K SLoC

coremidi-sys

Low level Rust bindings for CoreMIDI

generated.rs is generated with bindgen 0.69.4 using the following commands:

export FRAMEWORKS_DIR=$(xcrun --sdk macosx --show-sdk-path)/System/Library/Frameworks

bindgen ${FRAMEWORKS_DIR}/CoreMIDI.framework/Headers/MIDIServices.h \
    --allowlist-type "MIDI.*" --allowlist-function "MIDI.*"  --allowlist-var "kMIDI.*" \
    --blocklist-type "(__)?CF.*" \
    --constified-enum ".*" --no-prepend-enum-name \
    --no-debug "MIDI(Event)?Packet.*" \
    --no-copy "MIDI(Event)?Packet.*" \
    --no-doc-comments \
    -- -F ${FRAMEWORKS_DIR} > src/generated.rs

As of version 3 the minimum required Rust version is 1.51 due to the use of std::ptr::addr_of.

Dependencies

~46KB