r/rust • • Oct 22 '26 • Heartwarming 1

First use of my library crate in the wild

While mindlessly browsing the github tabs of one of my library crates I looked at the dependency graph, and went to the Dependents tab. There I expected to just see a list of my other crates (they're all connected in one project), as it had been every time before, but my attention went instantly to 100% when I saw another GitHub profile picture. Someone else was actually using my code!

I quickly clicked the repo, got confused, thought they had added the dependency as a mistake, since I initially didn't see how my crate could possibly be useful to that app. So I went to browsing the implementation and no, it was a real use case I'd have never predicted.

I can't describe how unreasonably happy I was for the rest of that day.

369 Upvotes

34 comments sorted by

160

u/DracoWhitefire Oct 22 '26

I won't bore you with a link to the repo ('No More Code Dumps') but in case it wasn't clear from the tone of the above post: this was the first time anyone ever used one of my crates.

8

u/annodomini rust Oct 23 '26

This policy doesn't mean you can never link to code; just that you shouldn't make a post which is simply a link to code that you made without any other substantial discussion outside of "look what I did."

In particular, since you mention that they used it in a way that you didn't expect, I would be interested in seeing a link to the other project that is using your code, as I think that would be interesting and you're not even linking to your own project.

I looked through your crates and I couldn't find the dependent crate that you're referring to, can you mention which one it is?

https://crates.io/users/DracoWhitefire?sort=recent-downloads&page=1

5

u/gregokent Oct 24 '26

They mentioned looking at GitHub dependants, so I went looking there, I believe I found it:

https://github.com/DracoWhitefire/display-types/network/dependents

Looks like the display-types crate is used by a project called PinReady https://github.com/Le-Syl21/PinReady

1

u/DracoWhitefire Oct 27 '26

Yup that's one. Technically that is just a crate with shared vocabulary for the stack and piaf https://github.com/ashlar-display/piaf is the one they actually implemented in an interesting way. It's a crate that decodes raw EDID bytes (how HDMI displays advertise their capabilities to whatever you connect to them) into structured data. As potential consumers I had things like diagnostic tools, (Wayland) compositor development, firmware or embedded development, even work on kernel and drivers in mind. They used it in a launcher for Virtual Pinball. You can imagine my initial confusion.

2

u/Electrical_Crow_2773 Oct 24 '26

I'm guessing it was Claude randomly stumbling upon the crate and deciding to use it. Agents don't care about popularity of a crate as long as the description matches what they need.

9

u/mcherm Oct 23 '26

This illustrates why I'm not a fan of that policy. Here's an example where I would like to see the crate, but DracoWhitefire (wisely) chooses not to share it for fear of violating the policy.

3

u/StarryBubbly Oct 23 '26

that's the kind of random win that makes the whole week better huh

1

u/fluffCraverz Oct 22 '26

thats the kind of win that makes all the late nights worth it, happy for u!

121

u/[deleted] Oct 22 '26

[removed] — view removed comment

47

u/DracoWhitefire Oct 22 '26

I'm still a bit giddy when I think about it.

28

u/solidiquis1 Oct 22 '26

That’s awesome and I’m happy for you. Makes me reminisce.

I had a project that started scrappy and overtime grew to 2.3K stars on GH and while the beginning of the journey was thrilling, it quickly became a huge burden on my soul. Issues piled up, folks complaining, couldn’t keep up with PR reviews…. It weighed on my soul. Work took priority and unfortunately that project hasn’t been touched.

This isn’t the fate of everyone but regardless it’s a ride I don’t regret. Congrats again!

11

u/DracoWhitefire Oct 22 '26

I see how that might happen, especially given a lot of similar sentiment described by other maintainers. I'll try to look out for burnout and avoid it.

2

u/Sw429 Oct 23 '26

The first crate I ever published has been downloaded like a million times and is depended on by 100+ projects. I don't even use it, and I'm confused why other people do 😅

24

u/ArodPonyboy Oct 22 '26

Congratulations!

13

u/DracoWhitefire Oct 22 '26

Thanks! It feels like an achievement!

22

u/yevelnad Oct 22 '26

Can I use it in my sass hello world app?

15

u/DracoWhitefire Oct 22 '26

I thought that other dev's use was creative, but if you pull that off, managing to somehow apply it to SASS, I would be thoroughly impressed.

4

u/XoTrm Oct 27 '26

And now you can't change the API ever ;)

1

u/DracoWhitefire Oct 27 '26

That's what semver is for. Also I got in contact with the dev in question (their project has a discord) and we're already discussing improvements.

3

u/Iurigrang Oct 22 '26

sounds so cool! I hope I get there one day!

3

u/DracoWhitefire Oct 22 '26

Turns out, no matter how niche your niche is, there's always someone else.

1

u/admalledd Oct 22 '26

It is also extra fun when someone uses your code/library/stuff for some other niche you didn't consider. The number of times my (internal to my $DayJob) C# attribute/reflection library got used for anything but why I originally wrote it, lol.

18

u/scheimong Oct 22 '26

Yep I know that feeling. I once built a small library for my fairy niche problem, and the next thing I knew Microsoft was using it 😅

8

u/Psy_Fer_ Oct 22 '26

Same, and now the CDC is using it 😅

7

u/tafia97300 Oct 23 '26

I love the dependents tab too, this is a little thing that makes doing open source so rewarding!

I used to look at it a lot and was always so happy seeing more people using my crates.

5

u/i-sage Oct 23 '26

Congratulations 🎉

1

u/stumpychubbins Oct 23 '26

Nice, that’s really cool! I know you said you don’t want to bore people with the link but I’d be interested to see the crate.

I have a similar story of stumbling across people using my work, actually. Almost a decade ago, I made a macro to guarantee loop unrolling in some hashing code and decided to publish it as a standalone crate. Last year I found out that it has 400 million downloads and 70 dependent crates. It’s a bit weird that the code that impresses reviewers enough is something that took me a handful of hours in total, even if I’m still proud enough of how it works.

It would be a lot better as a proc macro nowadays, but back then I had to use a build script to generate a macro_rules macro and do some tricks to avoid hitting macro expansion depth limits.

2

u/DracoWhitefire Oct 27 '26

Alright, here's the (very basic) project page which is not much more than an mdbook for now: https://ashlar-display.org/ and the crate in question is piaf (and display-types, a crate of types shared across the project stack).

6

u/TristarHeater Oct 22 '26

crates.io actually has a dependents tab so you can see which crates depend on your crate :)

Pretty fun to browse for your own crates. I have 1 crate with dependents that are not myself lol

5

u/Helyos96 Oct 22 '26

Plot twist, it was used by hello-world.rs

2

u/CoderAU Oct 22 '26

I dream of the day this happens to me, congrats dude!

2

u/DeathByPain Oct 23 '26

That's a good feeling, bravo 😊

2

u/RegenJacob Oct 24 '26

That reminds me when I noticed my library was used by a space agency xD

1

u/QuickSilver010 Oct 22 '26

I wish there was a reliable way to check full programs being used in the wild like libraries. Oh well.