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"] }