Rusty Stuffs

01 Jan 2021

Hello, 2021!

I’ve been experimenting with Rust for a while and I really like the language. I like how it forces me to check for all the possible values when I’m matching on something or checking a condition. Compile time checks, although quite annoying at times (because of my inexperience obviously) is so.. so much better than a dynamically typed language. I no longer mistakenly get variable undefined errors or a missing comma/semi-colon error at runtime only if the code gets inside a certain condition! There are so much things to like about the language honestly. Some of my favorites are:

There are obviously many more, but tbh I’m not really that much of an expert in Rust yet so I can’t say more. There are also challenges that I have not faced yet that many experienced and big projects face. I also haven’t really grasped the lifetimes concept to the core.

With this limited knowledge, I set out to build a Websocket server that lets us display logs in real time. The client software that runs on one machine must be able to send logs to a browser that is possibly running on another machine. The client machine cannot host a server directly because of security reasons. So, the flow of messages will be: Client -> Server -> Browser. I was able to successfully build this system, however its yet to be put into production and test. Maybe I’ll write about this more about this in another post?