custom_title/
custom_title.rs

1use rayso_rs::{downloader, RaysoConfig};
2
3const CODE: &str = r#"fn main() {
4    println!("Hello, world!");
5}"#;
6
7#[tokio::main]
8async fn main() -> Result<(), Box<dyn std::error::Error>> {
9    let config = RaysoConfig::builder()
10        .title("Bubble sort")
11        .background(false)
12        .padding(8)
13        .code(CODE)
14        .build();
15
16    println!("Generated URL: {}", config.to_url());
17
18    downloader::download(config).await?;
19
20    Ok(())
21}