helgoboss / reaper-rs

Rust bindings for the REAPER C++ API
MIT License
78 stars 8 forks source link

can not find integration test #60

Closed Levitanus closed 1 year ago

Levitanus commented 1 year ago

I don't see any new test actions in the actions list after building reaper-rs from git and linking test plugins to the UserPlugins folder. What can be an issue?

Linux Manjaro, but reaper is not fresh, it's my working copy. I'm mainly interested in continuing my own integration testing, but can't figure where to start...

Levitanus commented 1 year ago

Ahh, somehow, after the rebooting it made all 18 tests with internal reaper. Anyway, If You can provide a little guideline for continuing the testing — it could be grate!

I'm thinking now of implementing cliffon ReaImGui extension, as it seems to be the cheapest way to get to the GUI making at the moment. Currently, I've succeeded to build them but did not test yet.

helgoboss commented 1 year ago

The file name of your built extension binary that you put into the UserPlugins folder should start with "reaper_", maybe it didn't? You need to remove any "lib" prefix. There are adound 120 tests and exactly one action to execute them (search for "reaper-rs" in the action window).

I don't think that using ReaImGui from Rust is straightforward. ReaImGui are Lua bindings to imgui (C++). You probably don't want to write Rust bindings to Lua and then let ReaImGui call C++. Better use the Rust bindings of imgui or egui. I prefer egui because it's written in Rust and feels like Rust. I have integrated it in the latest ReaLearn pre-release, if you want to have a look.

Levitanus commented 1 year ago

Thank you for the detailed response.

Better use the Rust bindings of imgui or egui.

I started to look at imgui-rs, but was confused with backends and how to connect them to the swell window.

Strange, yesterday I spend a lot of time with ReaLearn, but had focuced on swell-ui crate, which also couldn't made working... Thanks, I'll check egui module!

helgoboss commented 1 year ago

The egui integration in ReaLearn is probably not exactly as you want it and there's a lot of stuff that you won't need.

I would recommend to start with these things:

Sorry, I know reaper-rs is missing good examples, I just didn't focus on that yet. There's the bare minimum in my repo reaper-rs-hello-world-extension.

Levitanus commented 1 year ago

Still need to figure it out for Linux. But you probably have other needs anyway.

I've tried to do this with python and JulianSader bindings to SWELL, even succeed to make brand-new custom widgets. But the window itself was made with on-the-fly lua script with desired dimensions and docking state. Then, a new SWELL window was made as child of this lua script window.

Anyway, it consumes a lot of FPS. ImGui was better, but still a lot of different overheads...

Levitanus commented 1 year ago

But you probably have other needs anyway.

I think, these are needs of every reascripter, that uses GUI) Playing around these days, I came to the conclusion, that sooner or later it would be great to make an SWELL egui-backend. But I have not such knowledge of SWELL and rust to go into this. I'm not sure in null usage in bindings and how they actually work. Also, I didn't succeed with reproduction of sws Window module.

I've decided not to waste time now in the endeavor of docking, but have an interface between the baseview (open_as_parented and update) and ui logic. And, if fate smiles in having (or building) native REAPER backend — switch to it)