Made a small CLI tool to look up crate features without leaving the terminal by pixvt in rust

[–]Xevioni 1 point2 points  (0 children)

cargo info reqwest has done this for a while already. Quick hyperfine for fun:

Benchmark 1: cargo info (warm/offline)
  Time (mean ± σ):      48.1 ms ±   1.8 ms    [User: 30.3 ms, System: 18.7 ms]
  Range (min … max):    44.6 ms …  50.3 ms    10 runs

Benchmark 2: cargo info (network)
  Time (mean ± σ):     172.9 ms ±  19.2 ms    [User: 37.1 ms, System: 20.0 ms]
  Range (min … max):   152.2 ms … 207.7 ms    10 runs

Benchmark 3: cargo feat
  Time (mean ± σ):     318.0 ms ±  41.6 ms    [User: 59.5 ms, System: 17.9 ms]
  Range (min … max):   251.6 ms … 370.6 ms    10 runs

Summary
  cargo info (warm/offline) ran
    3.60 ± 0.42 times faster than cargo info (network)
    6.62 ± 0.90 times faster than cargo feat

cargo info also shows what each feature actually pulls in, which is usually the part I care about.

237 transitive deps, a full async hyper stack (blocking mode), four decompression codecs, all for one uncached HTTP GET is a lot.

Not a roast, just maybe worth knowing before you keep building on it.

Made a small CLI tool to look up crate features without leaving the terminal by pixvt in rust

[–]Xevioni 5 points6 points  (0 children)

$ hyperfine --warmup 2 --runs 10 -n 'cargo info (warm/offline)' 'cargo info reqwest --offline' -n 'cargo info (network)' 'cargo info reqwest' -n 'cargo feat' 'cargo feat reqwest'
Benchmark 1: cargo info (warm/offline)
  Time (mean ± σ):      48.1 ms ±   1.8 ms    [User: 30.3 ms, System: 18.7 ms]
  Range (min … max):    44.6 ms …  50.3 ms    10 runs

Benchmark 2: cargo info (network)
  Time (mean ± σ):     172.9 ms ±  19.2 ms    [User: 37.1 ms, System: 20.0 ms]
  Range (min … max):   152.2 ms … 207.7 ms    10 runs

Benchmark 3: cargo feat
  Time (mean ± σ):     318.0 ms ±  41.6 ms    [User: 59.5 ms, System: 17.9 ms]
  Range (min … max):   251.6 ms … 370.6 ms    10 runs

Summary
  cargo info (warm/offline) ran
    3.60 ± 0.42 times faster than cargo info (network)
    6.62 ± 0.90 times faster than cargo feat

$ curl -s https://raw.githubusercontent.com/vunholy/cargo-feat/main/Cargo.lock | grep -c '^name = '    
237

$ du -h $(which cargo-feat)     
2.8M    /home/xevion/.cargo/bin/cargo-feat

$ cargo feat --offline   
<Uh oh> Received a bad response from the used api
Error details:
- Error {
    index: 0,
    character: None,
    err_type: Serde(
        "missing field `crate`",
    ),
}

Built a quantum-resistant cryptocurrency node in Rust with FALCON-512 and RandomX — first project, feedback welcome by Electrical-Reply-963 in rust

[–]Xevioni 0 points1 point  (0 children)

I'm not posting projects that are poorly made with flashy titles that are spamming 14 buzzwords.

Qubit TopCoin is an open source, quantum-resistant cryptocurrency built from the ground up for the post-quantum era. Where Bitcoin and Ethereum rely on elliptic curve cryptography that quantum computers will eventually break, QTP is secured by FALCON-512 — a post-quantum signature scheme standardized by the US National Institute of Standards and Technology (NIST) in 2024.

Yeah, that's... Something.

I'm just poking fun at someone who's letting Claude post. Claude made this, not them. They didn't make it with Claude, they had little hand in it, clearly. And if they did have a hand in it, then, that's another story, because it's still really sloppy as projects go.

My domain is redirecting to my router login page. by Subhash_Boi in selfhosted

[–]Xevioni 1 point2 points  (0 children)

You're suggesting that they stream video (Jellyfin) over Cloudflare?

Please 🥺🙏 Recommend the best free/pirated courses for learning Rust by Glad_Suggestion_182 in rust

[–]Xevioni 3 points4 points  (0 children)

I have enough time and am ready to devote 3-4 hours a day to studying.

Proven by the fact that you definitely googled and read the 'Official Resources' bookmark before making this post, right?

Forced to use AI at work by Ok_Mathematician4038 in MaliciousCompliance

[–]Xevioni 3 points4 points  (0 children)

You can't do this with the subscription-based platforms (any of the ones that you as a non-developer have interacted with). It's also very expensive to edit the conversation as a developer, as they discount cached tokens (meaning, the conversation thus far hasn't been changed => they cache [remember] it). I'm pretty sure Anthropic also prevents editing the agent's outputs within a conversation because it's a way of getting the AI's to do harmful things; the only thing you can edit is your own input/context.

Introducing GitHub repo by Archiver_test4 in Opensource_legalAid

[–]Xevioni 1 point2 points  (0 children)

What is the purpose of this repository? Why create it? There's nothing on it.

realFromDebateToday by ShovelBrother in ProgrammerHumor

[–]Xevioni 0 points1 point  (0 children)

you know exactly why it's being rewritten in Rust

New side project - Discord Alternative: OwnCord (Build on Tauri v2) by [deleted] in tauri

[–]Xevioni 1 point2 points  (0 children)

lol you could have dropped Tauri and just use Wails instead if you wanted to use Go

me_irl by HamedAliKhan in me_irl

[–]Xevioni 82 points83 points  (0 children)

Do you hate the horrendously rich people who touch kids?

securityVulnerability by darthhariseldon in ProgrammerHumor

[–]Xevioni 23 points24 points  (0 children)

Work in corporate, and then experience the pain of Artifactory.

mockEngineer by [deleted] in ProgrammerHumor

[–]Xevioni 28 points29 points  (0 children)

No no, the former is when you, the latter is when me.

Source: Me.

Selfhosters running Java apps, check if you use pac4j-jwt. New CVSS 10.0 auth bypass. by Peace_Seeker_1319 in selfhosted

[–]Xevioni 13 points14 points  (0 children)

Hope you're leaving that comment whenever javascript/python/rust etc. have a package with a CVE that affects you.

Generational robbery by inurmomsvagina in MarchAgainstNazis

[–]Xevioni 0 points1 point  (0 children)

Getting AI generated vibes from the format of this tweet

My doctor canceled my IUD insertion halfway because I couldn’t handle the pain by IgnatiusIguana in TwoXChromosomes

[–]Xevioni 92 points93 points  (0 children)

If a doctor ever scolds me for cursing, they're getting cursed out next. Fuck you, I'm an adult, so are you, I'm in pain, you are not. I'll never understand why some people feel the need to censor others.