Hello all,
I am a data center engineer of about 8 years now. I’ve spent the last 3 years or so slowly learning Python(I say slowly not because of my effort, but because learning Python was actually very difficult for me.) I am not an expert in any way shape or form, I understand the concepts of OOP, inheritance, classes, functions, methods, etc and I have found that the python documentation that can be found within the language is usually enough for me to be able to write the programs that I want to write. Very rarely have I had to write programs that have to bypass the GIL, but occasionally, I have created threadpools for applications that are not I/O intensive. What I’m saying is, for most things that I create, performance is enough with Python.
However, I have been inspired by how much love Rust is getting from the people who use Rust. I have tried to find some books for using Rust for network automation and unfortunately I have not been able to find any reputable books.
Most of the “automation” work that I do involves parsing data with regex, restructuring the data, converting the data into a modeled format and transforming something with that data. Does anyone have any common use cases for Rust that might interest me? Has anyone used Rust for network automation tools? With familiarity, can Rust’s intuitiveness match Python’s “from idea to deployment” speed? Or should I only learn Rust if I intend to create applications that need tight performance?
yes, I’ve seen how mangled python code can be, some of the code that our automation team uses barely makes use of functions or classes, which has made working on other people’s python code a nightmare. There’s one application that is thousands of lines long that I’m pretty sure I could condense into a few hundred lines.
Perhaps that’s a drawback of people who use python, they are not typically focused on the scalability of their code until it is actually used in prod. I believe for this reason, I would prefer a language that is compiled.
Last question, is using Rust on Windows as difficult as it seems at face value? It looked like to me that for using rust, it’s preferable to use linux or mac, as they don’t require you to install a compiler. For some reason, my org requires me to submit an exception for being able to install rust on my work computer. Is there anything that is inherently risky about using Rust, or is it because once the code is compiled, it cannot be reverse engineered?
I don’t think it is any more risky than using python. All crates are compiled from source locally, nothing is run when you download a crate. So there is an option to inspect things before you run them (but lets face it - almost no one does this in rust or python or any other language). I would guess that the issue you work has is simply that rust is new to them and they are wary of anything that is new.