๐Ÿ‘ฝ justyb

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

Actions

๐Ÿ‘‹ Join Station

2 Replies

๐Ÿ‘ฝ hiroantag

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

๐Ÿ‘ฝ justyb

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