Releases: RustAudio/rust-lv2
Release v0.6.0
We are happy to release the new version 0.6.0 of Rust-LV2, a safe, fast, and ergonomic framework to create LV2 plugins for audio processing, written in Rust.
What has changed?
- The C API bindings are now generated by maintainers. Previously, the bindings were generated at compile time by the user, which required additional dependencies and a properly installed clang. Now, usage of the Rust-LV2 framework is way easier and compile times are way shorter.
- The Rust-LV2 book is out now, explaining the concepts and API of Rust-LV2 using real plugins.
- Saving files along with the plugin state is now supported by the
lv2-atomcrate.
Release v0.5.1
We are happy to release the new version 0.5.1 of rust-lv2, a safe, fast, and ergonomic framework to create LV2 plugins for audio processing, written in Rust.
This release adds wmidi and lv2-units to the plugin feature set of lv2. This change was made since these features are almost always used by simple plugins that process MIDI messages; Plugins that process MIDI messages but don't use wmidi are pretty rare.
Release v0.5
We are happy to release the new version 0.5.0 of rust-lv2, a safe, fast, and ergonomic framework to create LV2 plugins for audio processing, written in Rust.
What has changed?
- The Worker features and extensions were implemented and are ready to be used now.
- The
uriattribute was introduced, which implementsUriBoundfor the attributed type. - The
lv2crate has been expanded to a powerful and configurable re-export crate. - Host features are now accessible from all plugin methods and a second feature collection type was introduced. All methods in the audio threading class (e.g.
run) have access to an instance of this second collection. - The
UriBoundandURIDtypes as well as code that belongs to them has moved to their own crate, calledurid. This change was made to make this code more reusable and to flatten the dependency graph.
Porting projects to version 0.5
Updating your dependencies
First of all, you're advised to use the lv2 crate to access the framework. This crate has optional dependencies to all sub-crates now, which can be activated via features. Let's assume that your dependency section looked like this before:
[dependencies]
wmidi = "3.1.0"
lv2-core = "1.0.0"
lv2-urid = "1.0.0"
lv2-atom = "1.0.0"
lv2-units = "0.1.0"
lv2-midi = { version = "1.0.0", features = ["wmidi"]}This dependency section translates to the following:
[dependencies]
wmidi = "3.1.0"
lv2 = { version = "0.5.0", features = ["wmidi", "lv2-units"] }The features lv2-core, lv2-atom, lv2-midi, lv2-urid, and urid are enabled by default and therefore don't need to be listed.
Using the re-export crate
After the update, you can not directly use the sub-crates anymore. Instead, you should use them via the lv2 re-export crate. A use lv2_core becomes a lv2::core now. lv2 also provides the super-prelude, which includes the preludes of all enabled sub-crates. You can simply use lv2::prelude::* to get all you need!
Using the uri attribute
Previously, you had to implement the unsafe, but very useful UriBound trait manually. Now, you can write something neat like this:
#[uri("urn:rust-lv2-book:eg-amp-rs")]
pub struct Amp;This attribute can implement UriBound for structs, enums, unions and type definitions and is safe to use since it always adds the null terminator to the generated URI.
API changes
The following types were renamed that were commonly used in plugins:
lv2_urid::Map->lv2_urid::LV2Maplv2_urid::Unmap->lv2_urid::LV2Umap
The lv2_core::plugin::Plugin trait has had some changes too:
- All feature collections are mutably borrowed now.
- There are two different feature collection types now, one for instantiation class methods and one for audio class methods.
Assuming that your previous Plugin implementation looks like this:
impl Plugin for MyPlugin {
type Ports = Ports;
type Features = Features<'static>;
fn new(plugin_info: &PluginInfo, features: Features<'static>) -> Option<Self> {
...
}
fn run(&mut self, ports: &mut Ports) {
...
}
}You should now use something like this:
impl Plugin for MyPlugin {
type Ports = Ports;
type InitFeatures = Features<'static>;
type AudioFeatures = ();
fn new(plugin_info: &PluginInfo, features: &mut Features<'static>) -> Option<Self> {
...
}
fn run(&mut self, ports: &mut Ports, _: &mut ()) {
...
}
}Initial release
After a year of development, rust-lv2 is now released for the first time.
These new crates were released along with the release:
lv2-atomv1.0.1lv2-corev1.0.1lv2-core-derivev1.0.1lv2-midiv1.0.1lv2-statev1.0.1lv2-sysv1.0.1lv2-timev0.1.1lv2-unitsv0.1.1lv2-uridv1.0.1lv2-urid-derivev1.0.1