# NIH-plug Template Minimal scaffold for new [NIH-plug](https://github.com/robbert-vdh/nih-plug) audio plugins (Rust + CLAP/VST3 + egui). Based on patterns from [`musiikki/codename-206`](http://192.168.2.199:3005/musiikki/codename-206). ## Quick Start ```bash # Clone this repo as your starting point git clone http://192.168.2.199:3005/musiikki/nih-plug-template my-plugin cd my-plugin # Edit: src/lib.rs, Cargo.toml, bundler.toml — replace placeholder values # See musiikki/codename-206 for a real-world example of how to fill these in ``` ## Build ```bash # Install Rust via rustup: https://rustup.rs # No VST3 SDK needed — NIH-plug bundles its own bindings. # Build + bundle the VST3 and CLAP cargo xtask bundle nih_plug_template --release ``` **Output:** `target/bundled/.vst3` and `.clap`, where `` is the `name` set in `bundler.toml` — **not** the crate name. Out of the box that means `target/bundled/Plugin Name.vst3`. On Linux the egui editor needs the GUI development headers: ```bash sudo apt install pkg-config libgl-dev libx11-dev libxcursor-dev libxcb1-dev \ libxcb-icccm4-dev libxcb-dri2-0-dev libx11-xcb-dev libxkbcommon-dev libxkbcommon-x11-dev ``` ## Deploy ### FL Studio FL Studio scans `C:\Program Files\Common Files\VST3` by default, **ignores directory junctions** (so a symlinked bundle is invisible to its scanner), and caches failed scans. 1. Copy the `.vst3` bundle to a folder FL scans (e.g. `C:\Program Files\Common Files\VST3`). 2. Copy the `.clap` bundle to a folder FL scans (e.g. `C:\Program Files\Common Files\CLAP`). 3. In FL Studio: **Options → Manage plugins → tick "Rescan previously failed plugins" → Find installed plugins**, then search for your plugin name (set in `bundler.toml`). ### Linux ```bash # VST3 cp -r "target/bundled/Plugin Name.vst3" ~/.vst3/ # CLAP cp -r "target/bundled/Plugin Name.clap" ~/.clap/ # Or globally: # sudo cp -r "target/bundled/Plugin Name.vst3" /usr/lib/vst3/ # sudo cp -r "target/bundled/Plugin Name.clap" /usr/lib/clap/ ``` ## Project Structure ``` Cargo.toml # Package deps — NIH-plug pinned to codename-206's rev bundler.toml # Bundle name for `cargo xtask bundle` src/lib.rs # Plugin skeleton — fill in params, DSP, editor xtask/ # Bundler xtask (cargo xtask bundle) .cargo/config.toml # xtask alias ``` ## License Apache-2.0 ## VST3 Licensing Note You must accept Steinberg's VST3 SDK licence before distributing VST3 binaries. NIH-plug's VST3 bindings are GPLv3; if you distribute, the plugin must also be GPLv3 (or you need a commercial Steinberg licence). CLAP has no such restriction.