-
Install Rust: Download and install Rust from the official website.
-
Set Up Environment Variables: Add
CLOSERMAC=1andOPENGL=1to your .bashrc or.config/closermac.confand./etc/opengl.confrespectively. -
Install RustDesk: Update your
Cargo.tomland add the following:[dependencies] rustDesk = { version = ".1", features = ["client"] }Install via:
cargo add rustDesk --features client
-
Create RustDesk Application:
-
Create a new project or modify an existing one.
-
Use the
rustedDeskmodule to create a new window:use rustDesk::Window; #[app] #[client] pub async fn main() -> std::io::Result<()> { let mut window = Window::new(8, 6); window.add("Window Title", "Main Window"); window.add("Button", "Click Me"); window.start(); Ok(()) }
-
-
Handle Windows:
-
Create a
TaborFrameand manage it within a window:use rustDesk::Tab; #[app] #[client] pub async fn open_window() -> std::io::Result<()> { let mut window = window1; window.add("Tab Title", "New Tab"); window.insert Tab::new("New Tab", 0, 0); window.start(); Ok(()) }
-
-
Run the Application:
cargo run rustDesk:main
-
Explore Documentation: Refer to the RustDesk documentation for more details and examples.
This approach allows you to create a basic RustDesk application with window management and tab creation, leveraging Rust's performance and simplicity.



