News for hackers. Stuff that matters.
Re:Fat Rand: How Many Lines Do You Need to Generate a Random... by portaltonowhere on Saturday February 08, 2025 @12:13PM (#42984378)
I agree with his sentiments in the article. I love Rust as a PL, but the situation with certain crates and dependency trees is a bit of a nightmare IMO. It's certainly a trade off.

I recently ripped out the rand crate and replaced it with some much simpler code ported from a C++ codebase. Still does what I need it to do but way fewer LOC and way less complexity. Is it as flexible as what rand and related crates offer? Maybe not, but that flexibility comes at a cost.

Re:Fat Rand: How Many Lines Do You Need to Generate a Random... by Ygg2 on Saturday February 08, 2025 @01:49PM (#42985163)
I also disagree, first off rand is working on simplifying it. Plus out of those dependencies it's hard to see something I'd rather do myself than trust other people with.

Windows-sys is necessary for w Windows OS kernel, libc is similar thing for *Nix, cfg-if is necessary for specializing targets per OS, arch, or SIMD capabilities.

Biggest offender is honestly zerocopy-derive. Which pulls in most dependencies.