RedBeardLab / rediSQL

Redis module that provides a completely functional SQL database
https://redisql.com
Other
1.55k stars 150 forks source link

Why do you choose Rust? #24

Closed codebuks closed 6 years ago

codebuks commented 6 years ago

In my opinion,the C language is the best choice to write a Reis Module,many other Redis modules are written by C language ,why do you choose Rust? It's just my question, maybe you are good at Rust, it' wonderful too.

siscia commented 6 years ago

Hi Ben,

It is an interesting question.

The module was indeed started in C, and I was using several tools to ensure correctness of the code, lack of memory leaks and so on.

This was working just enough, however when I introduced multithread I started to witness several bugs that crashed the whole application making it unusable, I tried really hard to debug it but without success.

Finally I gave up and I rewrote it in Rust.

Valgrind wasn't needed anymore, the code is automatically formatted and I don't experience anymore multithread bugs.

A life saver.

Granted, I am not an expert in C, but Rust allowed me to write this module with confidence!