Hey all.
I haven’t been around here much, so apologies for any lack of etiquette in my posting.
Recently, I made a start on learning the Rack API as means to upskill on C++ audio DSP testing/debugging, and such forth.
To facilitate this, I’ve come up with some workflows for building, testing, and deploying Rack plugins, CI/CD style, which I feel are working well enough to share, in the case that it may help others who are trying to figure out similar things.
In my dep
directory, I created a VCV Rack SDK CMake project file which accepts/requires a -DRACK_DIR="/path/to/unzipped/Rack-SDK"
, pointing at some unzipped copy of the Rack SDK on your local filesystem - and parses all of the contents into relocatable CMake targets which other CMake projects can include as a package dependency, and then link with.
I’m using vcpkg’s “filesystem registry” functionality to tell vcpkg that there is a CMake package called rack
where that CMakeLists.txt file is. My plugin project depends on this rack
package, so vcpkg fetches and parses it for me, and then I just link to rack::lib
or rack::sdk
.
Additionally, I’m using vcpkg to pull in Catch2 - and potentially, future dependencies, if I should choose to incur any.
The “normal” Makefile workflow is still functioning as expected for regular build/install commands. The vcpkg/CMake/Catch2 sits atop or alongside it, as the “developer” workflow, for myself and contributors, etc.
NOTE: I have not published any packages to vcpkg’s registry. The way this works is just by using local files for the rack
package. I’m aware of protocols about unofficial packages in the vcpkg registry, but don’t currently plan to push this package anyway.
The current implementation is a little bulky, and rough around the edges; I’m likely to change some naming conventions, possibly improve the rack
targets in various ways, and I may move the VCVRack faux-project files into it’s own repo… but, it works - at least, as far as I can currently tell. It would also be easy to extend this for different Rack SDK version numbers (but that is beyond my own personal need; PR’s welcome )
I hope I’ve managed to explain the mechanism clearly, but I’m sure the code, workflow files, and pertaining docs will be helpful otherwise. I’m happy to provide further insights also.
I have learned a whole tonne of things from lurking here and other audio programming forums over the years (definitely couldn’t have gotten the CMake package off the ground without this very forum), so I just thought I’d offer something back. If there is any interest - and it doesn’t step on any licensing issues - I’d consider parting this implementation out in some way such that it could be more easily shared and used by others. Elsewise, feel welcome to peruse the repo. If you know CMake and vcpkg, it’s fairly straightforward.
Thanks for reading, looking forward to sharing some cool modules with you all in the near future!