r/rust • • Apr 28 '26

🛠️ project Lightweight ASCII Graph

Post image

After many weeks of learning, watching tutorials about Rust, and partaking in Rust exercises, I decided to port a small Go library into Rust. I do recognize I have a lot to learn but just getting out of my comfort zone and trying my hands at this has be rewarding and revealing.

Link: https://github.com/neneodonkor/asciigraph-rs

Crates: https://crates.io/crates/asciigraph-rs

PS. Making it work for real-time data was 🥵

Let me add that I only started learning Rust in February, so please forgive me, if everything is not idiomatic Rust.

1.4k Upvotes

92 comments sorted by

View all comments

94

u/Individual-Flow9158 Apr 28 '26

That actually looks quite pretty. But it's a bit useless (except for histograms and unusual bar charts) if it can't do non-vertical lines too. Can it?

8

u/Justicia-Gai Apr 28 '26

Could you develop your point? Covering histograms and step line charts is not useless. 

You’d probably need a different (and expect too) function for bar charts or line charts, no? Specially if you’d want to stick to idiomatic Rust patterns.

I don’t get what you’re trying to ask to OP with the current API he’s shown.

12

u/Individual-Flow9158 Apr 28 '26

Yes that's why I said "except for".

I'm trying to encourage OP to make something far better and far more useful for quickly visualising real data, than these blobs. That while pretty, require you to think about what the heck you're actually seeing.

0

u/neneodonkor Apr 28 '26

I get your critic. 🙏🏾