March 17, 2022

Autoreload your Rust webserver with rust

When you create a long running application in Rust, you have to recompile your files everytime you make a change. The first way is to just run cargo run and Ctrl-C the process then run it again when you want to reload. A better way is to install cargo-watch, which will do this process automatically when you change a file in your project. You just need to run it with Read more

March 17, 2022

Using cargo-edit to simplify dependency management

Getting back into Rust, I want to start documenting my journey to getting a small service running. The first "problem" I had to solve was to add dependencies to the project. The official method is to add the dependencies manually in your Cargo.toml file. However, this is not convenient, and could lead to errors quite easily. Thankfully, you can make this easier using cargo-edit. This will let you add, remove, upgrade dependencies or set-version of your crate. Read more

Copyright Marin Gilles 2019-2021