Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use WebView for VST UI? #1

Open
satelllte opened this issue Aug 8, 2021 · 3 comments
Open

Is it possible to use WebView for VST UI? #1

satelllte opened this issue Aug 8, 2021 · 3 comments

Comments

@satelllte
Copy link

Hey @antonok-edm

I'm trying to understand is it possible to use WebView for VST UI?
For example, using these bindings: https://github.com/Boscop/web-view

@antonok-edm
Copy link
Owner

antonok-edm commented Aug 8, 2021

Hey @egormesyats!

I've looked into it briefly - there is an open call for contribution on the README:

  • Make it possible to create the webview window as a child window of a given parent window. This would allow webview to be used for the GUIs of VST audio plugins in Rust.

Currently web-view builds a window from scratch. vst_window on the other hand is designed to set up a window pointer and prepare it as a RawWindowHandle, which allows cross-platform compatibility with other Rust windowing and rendering libraries.

It's probably not easy to build RawWindowHandle support into web-view, but conceivably web_view::Builder could provide a .raw_window_handle(handle) method to build into an existing window rather than creating a new one.

Short of that, I'd recommend using an existing drawing library like wgpu (ampli-Fe is a good example of how that can be accomplished).

@satelllte
Copy link
Author

Got it. Thank you for your answer @antonok-edm :)

After another day of research, I found something interesting: https://github.com/mikesoylu/rust-vst-gui
I tested it on Mac and it did work!

If you're interested more you can check this branch on my fork: satelllte/rust-vst-gui#1. I've just added build scripts for Mac there.

Actually, @mikesoylu did a very good job making it work with web-view 🔥
It's probably worth creating a crate like vst_webview in the future. What do you think?

@antonok-edm
Copy link
Owner

I think a crate like that would be pretty useful for a lot of developers! Nice to see that it is possible already.

Looks like it doesn't work on Linux at the moment, which was my biggest motivation for creating vst_window in the first place - but it's probably not too difficult, relatively speaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants