Our great sponsors
-
dnsfun
DNS Server written in Rust for fun, see https://dev.to/xfbs/writing-a-dns-server-in-rust-1gpn
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
meta
Discontinued 🦀 GitHub Actions for Rust - recipes, discussions, questions and ideas (by actions-rs)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I'm going to leave this thing running. Feel free to play around with it as you please. You can even try to break it, too. If you discover any issues, please open up an issue on GitHub. If you have any fun ideas on what to implement, create a pull request. I will accept all of them and deploy them.
What this does is tell the compiler to optimize for small file size, perform some thin link-time optimisation, and strip debug symbols from the resulting binary. This results in a 2MB binary, there is certainly still a lot of room for making it smaller but this is good enough.
We don't even have to come up with something on our own. We can just copy the sample configuration from the actions-rs project to build and test the Rust code automatically, and the sample config for Docker.
Normally, I prefer to use GitLab and their CI system, but for this project we are using GitHub. What we want to achieve is that this project be compiled, the Docker container created and pushed to the Docker Hub automatically on every push. We can do this with GitHub Actions.
We don't even have to come up with something on our own. We can just copy the sample configuration from the actions-rs project to build and test the Rust code automatically, and the sample config for Docker.
Normally, I prefer to use GitLab and their CI system, but for this project we are using GitHub. What we want to achieve is that this project be compiled, the Docker container created and pushed to the Docker Hub automatically on every push. We can do this with GitHub Actions.
First, we must setup a new Rust project. Rust uses cargo, a package manager, build system, documentation generation tool, and so much more. If you haven't set up Rust, check out the instructions at rustup to get started. We use the cargo new subcommand to create a new Rust project.