| Crates.io | clap-clap |
| lib.rs | clap-clap |
| version | 0.5.0 |
| created_at | 2025-02-07 19:51:59.330757+00 |
| updated_at | 2025-05-26 15:09:30.791202+00 |
| description | CLAP plugin runtime |
| homepage | https://crates.io/crates/clap-clap |
| repository | https://github.com/mira-merkell/clap-clap |
| max_upload_size | |
| id | 1547347 |
| size | 456,231 |
A CLAP plugin runtime. Documentation is available at docs.rs.
This library is still very much WIP, 🚧 but the core functionality has already been implemented: that includes all event types, audio and note ports, parameters, saving/loading plugin state, logging, and reporting latency.
New minor versions, 0.x.0 will be published once a month throughout 2025.
The first stable version: 1.0.0-beta is planned for Sep 2025.
You can find the source code of a simple plugin template in:
./examples/plugin_template.rs.
To compile the sources, install Rust 1.85.0 or later (for the Rust 2024
edition) and clone the repository:
git clone https://github.com/mira-merkell/clap-clap
Build the example plugin with:
cargo build --example plugin_template --release
and look for the compiled dynamical library in target/release/examples/. The
name of the library is OS-specific:
libplugin_template.soplugin_template.dlllibplugin_template.dylibCopy the file to where your DAW can find it and rename it to:
plugin_template.clap.
Simply add this library as a dependency of your crate:
cargo add clap-clap
A CLAP plugin is a dynamical library with C ABI and a symbol: clap_entry
visible to the host to load the plugin. To compile your plugin with the
right ABI, specify the crate type in your Cargo.toml:
# Your crate's Cargo.toml:
[lib]
crate-type = ["cdylib"]
To export the entry symbols, use the provided clap_clap::entry! macro. The
macro must be invoked exactly once in the entire plugin code, but you can
specify multiple types as arguments. For example, assuming MyPlug and
MyPlugToo implement the trait Plugin, you can export them with:
// Your crate's lib.rs:
clap_clap::entry!(MyPlug, MyPlugToo);
This will also build a plugin factory that a CLAP host can use to crate
instances of your plugins. The bundle will be a one compiled artefact that you
can install as a *.clap file.
All contributions are welcome!
Help with writing documentation and examples will be much needed in the summer. Alternatively, if you could set aside a few hours in late 2025 to help with testing sample plugins before the stable release, that would be greatly appreciated. 🎈
Copyright (c) 2025 ⧉⧉⧉
This software is distributed under the MIT License. See LICENSE for more information.
Online repository available at: https://github.com/mira-merkell/clap-clap
Report bugs or submit patches via GitHub Issues.