#[reaper_extension_plugin]
Expand description

Macro for easily bootstrapping a REAPER extension plug-in.

Use the macro like this:

use std::error::Error;
use reaper_macros::reaper_extension_plugin;
use reaper_low::PluginContext;
use reaper_medium::ReaperSession;

#[reaper_extension_plugin]
fn plugin_main(context: PluginContext) -> Result<(), Box<dyn Error>> {
    let session = ReaperSession::load(context);
    session.reaper().show_console_msg("Hello world from reaper-rs medium-level API!");
    Ok(())
}

If you want to start with a preconfigured high-level Reaper instance right away, use the macro like this (please note that the high-level API has not been published yet):

use std::error::Error;
use reaper_macros::reaper_extension_plugin;
use reaper_high::Reaper;

#[reaper_extension_plugin(
    name = "Example",
    support_email_address = "support@example.org"
)]
fn plugin_main() -> Result<(), Box<dyn Error>> {
    Reaper::get().show_console_msg("Hello world from reaper-rs high-level API!");
    Ok(())
}