RustAudio / vst-rs

VST 2.4 API implementation in rust. Create plugins or hosts. Previously rust-vst on the RustDSP group.
MIT License
1.04k stars 91 forks source link

Consider re-exporting `num-traits` and `num_enum` #181

Closed piedoom closed 2 years ago

piedoom commented 2 years ago

Given the crate consumer will very likely be constructing their own tagged enums, should we re-export both the crates we use internally since they'll likely be imported anyways?

askeksa commented 2 years ago

Hmm, I don't know... I have a handful of crates using vst-rs, and none of them use any of these crates.

Isn't re-exporting most customarily used when types from a dependency appear in the API of a crate? Is that the case here?

piedoom commented 2 years ago

I would argue that we do, as parameters are accessed via a numeric ID, and I think tagged enums are the idiomatic way to do such in rust. We don't explicitly require it as part of the API but I think it is heavily implied to keep things readable. All that being said, i've since learned the bigger picture re: licensing issues with VST2 and don't think it's worth putting more work into this repo & instead redirecting it towards VST3 efforts/CLAP so might just close this in any case

glowcoil commented 2 years ago

I don't think there's much benefit to re-exporting these crates, since they're not exposed in any part of the public crate API. If users need the same functionality they can just those crates as a dependency, and if the versions are compatible Cargo will only include one copy of them anyway.