[−][src]Attribute Macro reaper_macros::reaper_extension_plugin
#[reaper_extension_plugin]
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::ReaperPluginContext; use reaper_medium::Reaper; #[reaper_extension_plugin] fn plugin_main(context: &ReaperPluginContext) -> Result<(), Box<dyn Error>> { let reaper = Reaper::load(context); reaper.functions().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):
ⓘThis example is not tested
use std::error::Error; use reaper_macros::reaper_extension_plugin; use reaper_high::Reaper; #[reaper_extension_plugin(email_address = "support@example.org")] fn plugin_main() -> Result<(), Box<dyn Error>> { let reaper = Reaper::get(); reaper.show_console_msg("Hello world from reaper-rs high-level API!"); Ok(()) }