VST 2.4 API implementation in rust. Create plugins or hosts.
Switch branches/tags
Clone or download
Latest commit 5b7c31f Oct 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples added gain effect Jun 17, 2018
src Fix typo. Aug 8, 2018
.appveyor.yml updated appveyor config Jun 22, 2017
.gitignore Add dimension expander example Dec 7, 2016
.travis.yml Update .travis.yml Aug 4, 2018
CHANGELOG.md Add initial changelog Oct 9, 2018
Cargo.toml Remove nightly. Closes #63 Oct 9, 2018
LICENSE Added license Apr 24, 2015
README.md Add deps badge Oct 9, 2018
osx_vst_bundler.sh changed crate from `vst2` to `vst` Dec 21, 2017

README.md

rust-vst

Travis Build Appveyor Build crates.io dependency status

Join the Rust VST chat (for web users, make sure you're registered/logged in) PLEASE READ: when you join, introduce yourself as a human! We get a lot of bot spam.

A library to help facilitate creating VST plugins in rust.

This library is a work in progress and as such does not yet implement all opcodes. It is enough to create basic VST plugins without an editor interface.

Library Documentation

TODO

  • Implement all opcodes
  • Proper editor support
  • Write more tests
  • Provide better examples

Crate

VST is available on crates.io. If you prefer the bleeding-edge, you can also include the crate directly from the official Github repository.

# get from crates.io.
vst = "*"
# get directly from Github.  This might be unstable!
vst = { git = "https://github.com/rust-dsp/rust-vst" }

Usage

To create a plugin, simply create a type which implements plugin::Plugin and std::default::Default. Then call the macro plugin_main!, which will export the necessary functions and handle dealing with the rest of the API.

Example Plugin

A simple plugin that bears no functionality. The provided Cargo.toml has a crate-type directive which builds a dynamic library, usable by any VST host.

src/lib.rs

#[macro_use]
extern crate vst;

use vst::plugin::{Info, Plugin};

#[derive(Default)]
struct BasicPlugin;

impl Plugin for BasicPlugin {
    fn get_info(&self) -> Info {
        Info {
            name: "Basic Plugin".to_string(),
            unique_id: 1357, // Used by hosts to differentiate between plugins.

            ..Default::default()
        }
    }
}

plugin_main!(BasicPlugin); // Important!

Cargo.toml

[package]
name = "basic_vst"
version = "0.0.1"
authors = ["Author <author@example.com>"]

[dependencies]
vst = { git = "https://github.com/rust-dsp/rust-vst" }

[lib]
name = "basicvst"
crate-type = ["cdylib"]

Packaging on OS X

On OS X VST plugins are packaged inside of loadable bundles. To package your VST as a loadable bundle you may use the osx_vst_bundler.sh script this library provides. 

Example: 

./osx_vst_bundler.sh Plugin target/release/plugin.dylib
Creates a Plugin.vst bundle

Special Thanks

Marko Mijalkovic for initiating this project