Yozhgoor

@yozhgoor.bsky.social

He/Him | Rustacean 🦀 | I like Cats Creator of cargo-temp Software Developer @RustMinded

Rust pro-tip to shrink your target directory: If you don't use a debugger, then don't waste disk space creating debugging info. Cargo.toml [http://profile.dev ] debug = "line-tables-only" split-debuginfo = "unpacked" # .. and don't debug deps [http://profile.dev .package."*"] debug = false

Rust constants are slowly but surely getting more powerful! On stable you can parse constants from environment variables. I remember having to pull in weird crates & macros to be able to do this. #rustlang

const TASK_COUNT: usize = {
    let input = if let Some(string) = option_env!("PERFMON_TASK_COUNT") {
        string
    } else {
        "16"
    };
    match usize::from_str_radix(input, 10) {
        Ok(val @ 2..) => val,
        Ok(_) => panic!("PERFMON_TASK_COUNT must be 2 or higher"),
        Err(_e) => panic!("Could not parse `PERFMON_TASK_COUNT`"),
    }
};

Hello there, I’m a Rust developer based in Belgium 🇧🇪 Mostly into backend stuff, developer tooling, terminal UI, WebAssembly experiments, and spending too much time tinkering with NixOS. I also like music and cats. Not a high-volume poster, but I’ll mostly share Rust and NixOS things.

We had a speaker drop out of the Rust Berlin meetup next week (Friday, 29th, at JetBrains). Anyone wants to speak? If you get in touch before Sunday, I will think about something to bring you from Japan as a gift.