💾 Archived View for station.martinrue.com › justyb › e4676c01d8884b9a9ef87455c5072f2b captured on 2024-05-26 at 15:08:04. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-02-05)
-=-=-=-=-=-=-
So apparently the sociopath in me has decided to try a bit of writing a Gemini client in Rust, which yes I know there's plenty already.
I think the point is less to make an actual client in Rust and more to learn sockets in Rust, and also to get a bit better at Rust in general.
Interestingly, there's not much to do to get a VERY basic Gemini client running. I'm currently using just the url and native-tls crates and in about 50 lines have a basic spit gemtext out onto the CLI.
But I think having done this, I've really come to apprciate the sometimes terse nature Rust tends to enforce about coding.
1 year ago · 👍 innerteapot, deravi, martin, hiroantag, nintron, ttocsneb
as someone who (half) made a Gemini client to learn rust it's a lot of fun, although I never got TUI stuff working the way I would've wanted. · 1 year ago
Oh I will say, there's no error checking outside of taking the error e and .to_string() it out onto the CLI. Additionally, anything not gemtext instantly crashes the client, so obviously there's a need to check the META to get the mimetype an be a bit more intelligent than "spew text".
But I think that's what is really neat about Gemini as a protocol. There isn't much to it, but because of that there's a pretty strict checklist of things to cover to have a more fully functioning client, and they come at you right out the gate. · 1 year ago