←back to thread

Introducing tmux-rs

(richardscollin.github.io)
857 points Jtsummers | 2 comments | | HN request time: 0s | source
Show context
mbreese ◴[] No.44455951[source]
> You might be asking: why did you rewrite tmux in Rust? And yeah, I don’t really have a good reason. It’s a hobby project. Like gardening, but with more segfaults.

I love this attitude. We don’t necessarily need a reason to build new things. Who knows what will come out of a hobby project. Thanks to the author for the great write up!

Also, my gardening is full of segfaults, coding a new project is definitely safer to my yard.

replies(15): >>44456003 #>>44456205 #>>44456799 #>>44457023 #>>44457048 #>>44457108 #>>44457783 #>>44458165 #>>44458298 #>>44458461 #>>44459018 #>>44459396 #>>44459476 #>>44459885 #>>44463066 #
nisegami ◴[] No.44456205[source]
Maybe my understanding of one or more concepts involves is wrong, but that "more segfaults" bit confuses me. Shouldn't the rust compiler prevent code that can segfault from compiling? Unless there was a lot of unsafe blocks involved.

Edit: apparently it did turn out to be a lot of unsafe code

replies(3): >>44456243 #>>44456244 #>>44457407 #
miroljub ◴[] No.44456243[source]
My understanding is that, even though tmux-rs is written in a safer language, it still can't beat the stability of an old battle-tested well-maintained project written by a group of highly competent developers.

Every new project is bound to have bugs that need to be ironed out during the time.

replies(4): >>44456531 #>>44456600 #>>44456731 #>>44456941 #
1. a_humean ◴[] No.44456600[source]
They wrote everything in unsafe rust where its very possible to segfault. This is not a normal C to Rust port. In a normal port you would never aim to have 100% unsafe rust code - rather you would hive off small parts of your application where you need unsafe so its highlighted and auditable. This is clearly an excerise for fun.
replies(1): >>44458331 #
2. nicoburns ◴[] No.44458331[source]
I think it is a normal porting process, it's just only half-finished at this point. The conversion to safe Rust is yet to come.