Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Plugin Manifest

There are a few necessities for cargo-reaper to recognize an extension plugin that is declared in a configuration file.

  1. The cargo manifest must be a package.
  2. The package must include a library target.
  3. The library target must include a name field.
  4. The library target must include cdylib in the crate-type field.

The above should be true whether the project is a single package, workspace with multiple packages or workspace package.

Package Manifest

An example of a single package manifest and its corresponding configuration file.

# Cargo.toml
[package]
name = "my_package"
version = "0.1.0"
edition = "2024"

[lib]
name = "my_extension_plugin"
crate-type = ["cdylib"]
# reaper.toml
[extension_plugins]
reaper_my_plugin = "./."

Workspace Manifests

Examples of acceptable workspace patterns and their corresponding configuration files.

Workspace Manifest

An example of a virtual workspace that does not contain a package attribute, but consists of multiple members, each of which being a package manifest meeting the plugin manifest criteria.

# Cargo.toml
[workspace]
resolver = "2"
members = ["crates/*"]
# reaper.toml
[extension_plugins]
reaper_my_plugin_1 = "./crates/my_plugin_1"
reaper_my_plugin_2 = "./crates/my_plugin_2"

Workspace Package Manifest

An example of a workspace package manifest and its corresponding configuration file.

# Cargo.toml
[workspace]
resolver = "2"
members = ["crates/*"]

[package]
name = "my_workspace_package"
version = "0.1.0"
edition = "2024"

[lib]
name = "my_extension_plugin"
crate-type = ["cdylib"]
# reaper.toml
[extension_plugins]
reaper_my_plugin = "./."