Closed GavinRay97 closed 3 years ago
Apologies, I just noticed the diff is a bit dirty. I think Prettier auto-formatted the Markdown and removed some trailing spaces on lines =/
The raw changes are:
Cargo.toml
lib named to start with reaper_
[lib]
name = "reaper_my_extension"
> **IMPORTANT:** Compiled REAPER Plug-in Extensions (IE, `.dll` files) must be prefixed with `reaper_` in order for REAPER to load them during startup. Naming the library `reaper_my_extension` in `Cargo.toml` will result in the compiled file being named `reaper_my_extension`, thus obeying this rule. If you rename your library, make sure that the compiled file placed in `REAPER/UserPlugins` is prefixed with `reaper_` before attempting to test it.
#### Step-by-Step Instructions
The following instructions should result in a functional extension, loaded into REAPER on start:
Cargo.toml
above to the directorylib.rs
to src/lib.rs
in the directoryCargo.toml
resides), run cargo fetch
to fetch needed dependenciescargo build
to generate the compiled plugin extension inside of the target/debug
directoryREAPER/UserPlugins
directory
target/debug
file, to REAPER/UserPlugins
so that they were synced
ln -s ./target/debug/<name-of-the-compiled-extension-file> <path to REAPER/UserPlugins>
mklink \D target\debug\<name-of-the-compiled-extension-file> %AppData%\REAPER\UserPlugins
Thanks @GavinRay97!
[Close #34]
Unsure of how accurate all of this is, for instance:
This appears to be true, but not sure about how exactly extensions work:
Is
cargo fetch
necessary prior tocargo build
, or willcargo build
runfetch
? I figured if anything, you want the packages downloaded so that you can get IDE completions and types + documentation for them in case you want to edit before compiling the starter extension code.