Ah, I see. I'm actually very experience with cloud engineering then!
I've done a lot of work in cloud deployments, Docker and containers, orchestration, system administration, configuration management, AWS, and some full stack development related to such operations.
Interestingly, you don't really need Rust for that kind of role. But let me clarify that a bit more.
tl;dr: You don't need Rust as a cloud engineer, plain 'ol bash is enough. But with some hard work and dedication ( and the time budget from your employer ) you can use Rust to build full-blown applications or frameworks to really "step up your game" so to speak.
For essentially everything you do as a DevOps/cloud engineer, you are usually automating processes that involve other existing tools, such as Docker or Terraform or the system package manager inside or outside of a container, the build system such as Jenkins or Drone, etc., and the absolute most common language me and my colleague use by far is plain 'ol Bash scripting.
You almost never need anything else, and you don't have to install anything on any Posix system to get it to work.
Now I don't necessarily like bash. I mean, it's got all these weird things about it that just don't feel nice, but once you get over a few weird things and you get used to doing if statements and variable expansions, it's all you need.
Combined with tools like curl
, jq
, awk
and others, you've got what you need to access REST APIs, control docker, automate builds and deployments, etc. Almost everything has either a REST API and/or a CLI, and that gives you the control you need from Bash.
Now I'm sure different roles in different organizations will encompas different things in the vast field of "cloud engineering", but honestly, for me, a cloud engineers job is less programming and more solution designing.
It's about putting together all the other tools out there, such ad Docker, Terraform, and, dare I say, Kubernetes ( I hate Kubernetes, but there's a time and place for it ). You job is to take the companies problems and goals and find a combination of tools and workflows that, put together, help solve their problems.
Like setting things up so that you can push to a git repo and have your app automatically built and deployed to your cloud environment. Or providing a way to manage multiple environments for different use-cases such as development, performance testing, and production. It's about making sure you can quickly and efficiently manage your resources in the cloud or on-premise depending on your needs and automating things so that it doesn't take weeks to do things like getting HTTPS certificates for instance.
The most important thing is being able to take a problem, know your goals, and try to come up with the best solution to that problem using what tools you have available.
So where does Rust come in? While for most things you don't need Rust, or even Python for that matter, there are times where there is a hole in what you can accomplish with existing tools. These are opportunities for Rust. The caveat is that, in my experience, these holes, when they pop up, have not been small ones and they take serious development time to fill.
For instance, I made a framework called Lucky for the Juju DevOps orchestration tool. I was much newer to Rust at the time, but it took me about 5 months of development to finish, but it made Juju deployment development so much easier.
I also made the Juju Lens desktop application with Rust ( there's also a video here ). This was a custom GUI as a replacement to the less functional GUI that came with Juju, so that operators could manage their Juju cluster and SSH into them with ease. Rust was really awsome for Juju Lens because I was able to use Tauri and Rust bindings to libssh
to connect my HTML5+JavaScript GUI to a native SSH connection managed by Rust.
Juju Lens took me ~4 months to finish.
Finally, my colleague is currently working on a full-stack Rust application for automating the management of cloud environments using Terraform. It's like a GUI for creating pre-scripted cloud environments out of a collection of templates. This is a big project, but the payoff is going to be amazing because people will be able to create environments for their apps whenever they want just by clicking buttons. This app also used HTML and JavaScript for the UI, but uses a Rust API server and Hasura for the server side.
So, in summary, while I have found Rust to be an incredible tool for cloud engineering, all of the uses of Rust so far have involved a lot of time and effort to make them useful ( because it is a larger-scale app that actually needs to be made ), which requires the time and budget from your employer, and you have to convince your employer that it's worth the effort. Depending on who you work for or what you are working on specifically, this can be difficult.
Finally, what libraries or Rust resources did I use? The standard library in Rust is intentionally somewhat minimal compared to Python's, for instance. Start with the standard library and if it doesn't have it look for crates.
For different tasks there's often some stand-out crate that seems to be somewhat de-facto, but here's a list of some of the common things I've done and what crates I used for it:
- HTTP server: Warp, but it's not the only good one. I think Actix is good, too, and I've heard good things about most of the other Rust web servers.
- HTTP requests: reqwest
- Serialization ( aka. JSON, YAML, TOML, etc. ): Serde is king. Does all of the common formats and some uncommon ones with ease.
- SSH: ssh2
- Git: git2
- CLI argument parsing: structopt ( create CLIs by writing structs! ) and clap ( powers structopt )
- Thread synchronization: parking_lot (
Mutex
's and locks ), crossbeam ( channels and thread utilities ) - Async executor and libraries: smol, Tokio ( but I prefer
smol
when possible because it is smaller ) - Finding Rust crates: lib.rs ( an alternative to crates.io that has a better search engine and search ranking )
Also, feel free to use the forum to ask "what crate should I use to do X?". This forum, or rather the people behind it and the Rust community, is one of the most valuable resources for Rust.
I guess for all that wall of text, that doesn't exactly tell you where to start learning, though.
I would say that @ZiCog was right and starting with a good understanding of the Rust book is probably the best start. All of the other tools and frameworks will make much more sense with a solid understanding of how Rust works. And Rust isn't like JavaScript where you have to learn Vue.js or React or [Insert Framework Name Here] more than you have to learn the language itself. Rust frameworks tend to force you into less and be easier to learn when you know the language, without requring like a massive investment to get to know and understand the framework.