logo

Rust crates reviews

Cryptographically verifiable, distributed dependency reviews

crate: midir

https://lib.rs/crates/midir/

Add the last reviewed version to Cargo.toml / [dependencies]:

midir = "0.5.0"

Filter reviews clicking on the numbers in the summary.

Full column names in tooltip hints: rating Negative, rating Neutral, rating Positive, rating Strong, thoroughness, understanding, reviews count.

Neg
Neu
Pos
Str
tho
und
rev
crate version
rating
date
reviewer
thoroughness, understanding
midir 0.5.0
negative
2019-09-02
low, low

Good starting point, and my favorite Rust MIDI API so far, but likely unsound as stands.

Pros:

  • Pure rust, no mucking with building building C/C++ libs like with portmidi
  • To be WASM/Browser compatible (PR made).

Cons:

  • Likely unsound as currently stands (transmute_copy, type punning, sketchy memalloc crate use, haven't vetted thread safety properly, ...)
  • API clunky in spots (mix of known issues and easily fixed surface level stuff)
  • Needs more unit test coverage if possible (are there perhaps virtual MIDI devices for windows that could be added to CI...?)

TODO:

  • rating: netural: Eliminate as much sketchy unsafe as possible.
  • rating: positive: Clean up API design a bit (async, saner member functions, deal with Send inconsistency, maybe make connecting not consume MidiInput s?)

Detail

FileRatingNotes
examples/test_forward.rs+1
examples/test_play.rs+1
examples/test_reuse.rs+1
examples/test_sysex.rs+1
src/backend/asla/mod.rs0Some extra unsafe, use of uninit data possibly UB
src/backend/coremidi/mod.rs0Is Core MIDI thread safe? (unsafe impl Send for MidiOutputConnection)
src/jack/mod.rs-1Use of transmute_copy on Box is skeeeeeeetchy, uninitialized too :(
src/jack/wrappers.rs-1Is JACK thread safe? Ringbuffer::read is unsound! Lots of unsafe but mostly for sane FFI.
src/winmm/handler.rs0unsafe for FFI, some pointer casts I haven't thoroughly vetted
src/winmm/mod.rs0unsafe for FFI, uninitialized :(, sketchy deallocate API. Is WinMM thread safe? 333: UB &mut violates aliasing?
src/backend/mod.rs+1
src/os/mod.rs+1
src/os/unix.rs+1
src/common.rs0Consumption of the MidiInput/MidiOutput clients/factories on connect seems a bit strange, especially after the ports refactor.
src/errors.rs+1
src/lib.rs+1unsafe, but sound
tests/virtual.rs+1
.cargo-ok+1
.gitignore+1
.travis.yml+1RCE: Downloads/installs jack from the internet
appveyor.yml+1
Cargo.toml+1
Cargo.toml.orig+1
LICENSE+1
README.md+1
OtherRatingNotes
unsafe-199% sure something in here is unsound. transmute_copy, type punning, use of memalloc crate.
fs+1N/A
io0libc... maybe safe?
docs+1
tests0Good examples, but needs more automated unit/integration tests. Admittedly hard given the lack of MIDI devices on CI servers...

src/backend/asla/mod.rs

LineWhatNotes
21fn poll+1
81unsafe impl Send for EventEncoderIs ASLA thread safe?
578unsafe in handle_inputConstruction of uninitialized vec, UB?

© bestia.dev 2023, MIT License, Version: 2023.608.1636

Open source repository for this web app: https://github.com/bestia-dev/cargo_crev_web/