How I speeded up my Rust builds on GitHub ~30 times

Rust is a great programming language, but it’s compiler is known to be slow. The main reason is that it checks so many things during the compilation in order to provides memory and concurrency safety. Like in many other cases, pipelines may be speeded up by caching, but it is very important to set the caching properly, otherwise it won’t help. Besides compiling your code may be slow, you also may want to use some cargo tools to lint and check your code and this will require to be compiled as well, if you don’t want to download binaries....

2022-05-18 · 5 min · Boban Acimovic

How to fix possible missing firmware warning during kernel update on Linux Mint

If you are running default kernel with your Ubuntu or Linux Mint installation, you probably won’t face this problem during kernel updates because all packages are coming from the official distribution sources. However, if you like to run the newest Linux kernels and update them using mainline kernel installer, you may get warning possible missing firmware during the installation. Few days ago I got this warning on my Linux Mint 20....

2022-05-18 · 2 min · Boban Acimovic

Custom Go HTTP handlers using generics

Few days ago Go 1.18beta1 was released and with it the first official generics support. I was embarrassed with standard Go’s HTTP handler functions for quite a while. If you are not familiar with Go, you probably wonder why, but if you are familiar, I believe you know. For example, implementing a RESTful API using idiomatic Go requires lot of code repetition in order to JSON decode request bodies and JSON encode response bodies....

2021-12-19 · 4 min · Boban Acimovic

Parsing custom datetime format in Rust using serde

Most of the date and time related crates like time or chrono already implement serde traits making date or datetime parsing quite easy. This applies just if the format is standard, but what happens if the format is not standard? Let’s say we want to parse datetime looking like this 2021-10-24T07:48:26.389646Z. There is no timezone information so I decided to try the PrimitiveDateTime type from time crate. I didn’t consider using chrono at the moment because of the RUSTSEC-2020-0159 problem....

2021-10-24 · 2 min · Boban Acimovic

Running stack of microservices using docker-compose and acim/go-reflex image

Go is very attractive language for microservices’ development, but using acim/go-reflex image and docker-compose you can run multiple microservices including your gateway on your local machine. This image can run virtually any Go server based application and also reacts on changes in the code and recompiles the binary on the fly. If you want to debug your microservices’ stack or develop a new feature where you have to touch multiple services, this is very good tool to do so....

2021-10-23 · 3 min · Boban Acimovic