GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - godofecht/danzig: A VST3 plugin framework in pure Zig. Zero dependencies, lock-free parameters, WebView UI.

BranchesTags
Open more actions menu

Latest commit

 

History

37 Commits
37 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
examples
examples
 
 
scripts
scripts
 
 
site
site
 
 
src
src
 
 
ui
ui
 
 
wrappers
wrappers
 
 
.gitignore
.gitignore
 
 
BUILD_AND_TEST_SUMMARY.md
BUILD_AND_TEST_SUMMARY.md
 
 
CITATION.cff
CITATION.cff
 
 
DANZIG.md
DANZIG.md
 
 
LICENSE
LICENSE
 
 
PLUGINVAL_REPORT.md
PLUGINVAL_REPORT.md
 
 
README.md
README.md
 
 
build.zig
build.zig
 
 
build.zig.zon
build.zig.zon
 
 
setup.sh
setup.sh
 
 

Repository files navigation

danzig

CI Zig

A VST3 and CLAP plugin framework in pure Zig. No JUCE, no Steinberg SDK, no C++ in the core. AUv2 and AAX builds are available through optional external CLAP wrappers. src/vst3.zig implements the VST3 C ABI directly as extern structs of callconv(.c) function pointers, which is what a C++ vtable is at the machine level.

Read the guide: docs/WIKI.md | Plugin formats: CLAP / AU / AAX

Setup

git clone https://github.com/godofecht/danzig
cd danzig
./setup.sh

setup.sh checks your Zig version, builds, runs the tests, packages the universal VST3 bundle, and prints where it landed. It exits non-zero on failure and is safe to run repeatedly. Pass --release for a ReleaseFast build.

By hand:

zig build                     # Build Summary: 29/29 steps succeeded
zig build test --summary all  # Build Summary: 9/9 steps succeeded; 35/35 tests passed
zig build vst3                # universal arm64 + x86_64 VST3 bundle in zig-out/
zig build clap                # universal arm64 + x86_64 CLAP bundle
zig build test-clap           # CLAP factory and processing integration test
zig build install-vst3        # copy it to ~/Library/Audio/Plug-Ins/VST3/
zig build install-clap        # copy it to ~/Library/Audio/Plug-Ins/CLAP/

Then:

lipo -info zig-out/DanzigGain.vst3/Contents/MacOS/DanzigGain
Architectures in the fat file: zig-out/DanzigGain.vst3/Contents/MacOS/DanzigGain are: x86_64 arm64

Requirements

  • Zig 0.14.1 or 0.15.2. Both are tested in CI on every push.
  • macOS for the VST3 bundle, install-vst3, and the GUI example. The library, the unit tests, and the CLI examples are portable Zig.
  • Xcode command line tools, for lipo and the macOS SDK.

What's here

Core library (src/)

File Contents
clap.zig The CLAP 1.x C ABI, plugin lifecycle, parameters, audio buses, events and state interfaces.
vst3.zig The VST3 C ABI: IUnknown, IPluginBase, IComponent, IAudioProcessor, IEditController, and the structs they pass.
plugin.zig Plugin lifecycle and a heap-backed ParameterMap.
audio.zig dBToLinear, GainProcessor, SimpleRamp, AudioBuffer.
params.zig Lock-free AtomicParam and ParamStore(N). One cache line per parameter, no heap, no locks.
tests.zig 35 unit tests.

Examples (examples/)

Example Run it
danzig-minimal. The smallest complete plugin, and the file to copy. zig build run-minimal
danzig-gain. The plugin packaged into the .vst3 bundle. zig build vst3
danzig-gain-clap. Shared gain DSP exported through the CLAP ABI. zig build clap
danzig-clap-test. CLAP factory, parameters and processing test. zig build test-clap
danzig-test. Drives the built plugin through the raw VST3 C ABI. zig build test-integration
danzig-gain-standalone. Offline WAV gain processing. zig build run-standalone
danzig-webui. An HTTP server in pure std.net. ./zig-out/bin/danzig-webui
danzig-gain-ui. Native macOS window, WebView plus CoreAudio. zig build run-gui

See examples/README.md for the index.

Build artifacts

zig build installs:

zig-out/
├── bin/
│   ├── danzig-minimal              offline demo of the minimal plugin
│   ├── danzig-gain-standalone      WAV gain processor
│   ├── danzig-webui                HTTP server for the web UI
│   ├── danzig-gain-ui              native window (macOS)
│   └── danzig_test                 VST3 ABI integration harness
└── lib/
    ├── libDanzigGain.dylib         gain plugin, native arch
    ├── libDanzigGain_arm64.dylib   gain plugin, arm64
    ├── libDanzigGain_x86.dylib     gain plugin, x86_64
    └── libDanzigMinimal.dylib      minimal plugin, native arch

zig build vst3 adds the bundle:

zig-out/DanzigGain.vst3/
└── Contents/
    ├── Info.plist
    ├── PkgInfo
    └── MacOS/
        └── DanzigGain              universal arm64 + x86_64

libdanzig.a is not installed. The static library is linked into each target rather than shipped on its own.

Sizes, from zig build -Doptimize=ReleaseFast:

Artifact Size
DanzigGain.vst3/Contents/MacOS/DanzigGain 84 KB (universal)
lib/libDanzigGain.dylib 52 KB
lib/libDanzigMinimal.dylib 52 KB
bin/danzig-minimal 168 KB
bin/danzig-gain-standalone 288 KB
bin/danzig-gain-ui 572 KB

The default Debug build produces the same artifacts at roughly 1 to 2 MB each.

Current state

The existing VST3 implementation has passed host validation. The CLAP adapter and AUv2/AAX wrapper build configurations are being validated separately; see format-specific status and requirements. The VST3 core library, tests and build pipeline remain available. examples/danzig-gain builds a universal .vst3 bundle that a host loads and instantiates, and it passes pluginval at strictness level 5:

pluginval --validate zig-out/DanzigGain.vst3 --strictness-level 5
Num plugins found: 1
Testing plugin: VST3-Danzig Gain
...
SUCCESS

The factory returns a populated PClassInfo, and createInstance builds one object exposing IComponent, IAudioProcessor, and IEditController over a shared lock-free parameter store. See Current state for the detail.

Documentation

Published at godofecht.github.io/danzig.

  • docs/FORMATS.md. CLAP and external AUv2/AAX wrappers, packaging, signing and validation.
  • docs/WIKI.md. The single-page guide. Architecture, quickstart, parameters, audio helpers, bundle packaging, testing, troubleshooting.
  • docs/INDEX.md. The older multi-page docs.

Install as a dependency

Fetch danzig into a Zig project:

zig fetch --save git+https://github.com/godofecht/danzig

Then wire the module in your build.zig:

const danzig = b.dependency("danzig", .{});
your_plugin.root_module.addImport("danzig", danzig.module("danzig"));

Requires Zig 0.14.1, 0.15.2, or 0.16.0.

License

MIT. See LICENSE.

VST is a trademark of Steinberg Media Technologies GmbH. danzig vendors no Steinberg SDK code, and shipping plugins in VST3 format is governed by Steinberg's own terms, independently of danzig's MIT license.

About

A VST3 plugin framework in pure Zig. Zero dependencies, lock-free parameters, WebView UI.

godofecht.github.io/danzig/

Topics

audioaudio-devaudio-plugindsppluginvst3zigzig-package

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.