Can I use JUCE and Vulkan together?

Hello, everyone
I have some silly questions
I have two RTX 2060 VGA cards in my own desktop
Both together have 24 GB VRAM, I rememeber
I want to make use of these VRAM for some nice use cases
Actually I studied Vulkan a little bit
So can I create a JUCE AudioAppComponent with Vulkan API together ?
For example, compiling and linking Vulkan libraries to my own JUCE apps

Of course, JUCE supports OpenGL, which however I don’t wanna study
because Vulkan is going to replace OpenGL soon
I want to use Vulkan in my own JUCE sound engineering apps, which will be fancy

So I will really appreciate if you can help me with this inquiries
Thank you

https://vulkan.lunarg.com/sdk/home#windows

Yes, you can definitely do it. Vulkan is wonderful and I highly recommend blending these two systems.

This possibility will get even better hopefully once this (Juce-rs possible!) is in motion.

As I was running the transpilers, I was making sure everything was structured such that it would be ergonomic and easy to use from an environment in which Vulkan is already integrated.

1 Like

Hello, thank you for your help !
I will try to integrate Vulkan APIs inside now
So, is "“juce-rs” the RUST based programming environment ?
When you have further news, please post an article here
If “juce-rs” can make it much easier, I want to use it
Have a nice day and see you again, Klebs

yes, indeed! juce-rs is pure rust and will also be roughly one to one in terms of feature parity with the c++.

I am super excited to try it too! I think it will make certain things much easier, safe, and super speedy.

However, I would like to speak with the good JUCE folks here who handle the licensing etc to make sure that if people like juce-rs, it can be integrated such that doing so doesn’t interfere with any existing licence agreements! Off the top of my head, I don’t think it will cause any such problems, but I am not an expert in this matter and would like to make sure I speak with somebody here who is!

I think one possible goal is to get it so that folks have the ability to use both the c++ and/or the rust under the same license. If that is possible, we can do something like this on the rust side:

[package]
edition = "2021"
name = "my-project"
version = "0.1.0"

[dependencies]
juce-colour = "*"
juce-buttons = "*"
juce-windowing = "*"

and then in the rust code, we can do:

let b = juce::Button::new("My Button");

let c = juce::Colour::new_from_argb(0x73c2fb);

let add_to_desktop = true;

let w = juce::ResizableWindow::new("My Window", add_to_desktop);

This functionality can be utilized in the same rust project as where Vulkan is set up. Vulkan in rust is configured analogously to the example above. You use a library such as ash, vulkano, or vk-sys to get up and running.

Your Cargo.toml might look something like this, and then you’re good to go:

[package]
edition = "2021"
name = "my-project"
version = "0.1.0"

[lib]
crate-type = ["cdylib", "rlib"]


[dependencies]
juce-colour = "*"
juce-buttons = "*"
juce-windowing = "*"
ash = { version = "0.37.0", default-features = false, features = ["linked", "debug"] }
1 Like

Oh, thank you so much for your kind explanations, Klebs !!
I will study the materials you recommended, though I am new to RUST at this moment
I think you mean your approach will make things much easier, so I will apply your methods
See you, Klebs

1 Like