Skip to content

lrhodin/nih-plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nih Plug Template

Building

After installing Rust, you can compile Nih Plug Template as follows:

cargo xtask bundle nih_plug_template --release

Development Workflow

For local development on macOS, you'll need to bypass Apple's security restrictions that prevent unsigned plugins from loading in DAWs. This template includes a development signing workflow that handles this automatically.

Quick Start

Option 1: Auto-detected plugin name (recommended):

cargo xtask dev-build

Option 2: Specify plugin name explicitly:

cargo xtask dev-build nih_plug_template

Option 3: Use the wrapper script:

./dev-build.sh

Option 4: Two-step process:

  1. Build the plugin:

    cargo xtask bundle nih_plug_template --release
  2. Sign for development:

    cargo xtask dev-sign nih_plug_template

That's it! Your plugin is now ready to use in your DAW without security warnings.

What the dev-build command does

The cargo xtask dev-build [plugin-name] command combines building and signing into a single convenient step:

  • Auto-detects plugin name from Cargo.toml if not specified
  • Builds the plugin bundle using cargo xtask bundle <plugin-name> --release
  • Signs for development using the same process as dev-sign (see below)
  • Provides clear feedback about each step and any errors
  • Ready to use in your DAW immediately after completion

This is the recommended approach for development as it's faster and less error-prone than running the commands separately.

What the dev-sign command does

The cargo xtask dev-sign [plugin-name] command (also supports auto-detection):

  • Removes quarantine attributes from plugin bundles (prevents "unable to verify malware" errors)
  • Applies ad-hoc code signing using codesign --sign - (bypasses Apple security)
  • Copies plugins in your system plugin directories:
    • ~/Library/Audio/Plug-Ins/CLAP/ for CLAP plugins
    • ~/Library/Audio/Plug-Ins/VST3/ for VST3 plugins
  • Handles plugin name mapping automatically (e.g., "nih_plug_template" → "Nih Plug Template")
  • Works for both CLAP and VST3 formats simultaneously
  • Provides clear feedback about what's happening and any errors

Plugin Name Mapping

The system automatically maps your Cargo package name to the display name defined in bundler.toml:

[nih_plug_template]
name = "Nih Plug Template"

If no explicit name is defined, it converts kebab-case to Title Case (e.g., "my-plugin" → "My Plugin").

Troubleshooting

  • "No plugin bundles found": Make sure you've run cargo xtask bundle first
  • Permission errors: The dev-sign command doesn't require sudo - it uses ad-hoc signing
  • DAW still shows warnings: Try restarting your DAW after running dev-sign
  • Plugin not found: The command automatically creates plugin directories if they don't exist

Security Note

This development signing workflow is intended for local development only. For distribution, you'll need proper code signing certificates and notarization through Apple's Developer Program.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •