Our great sponsors
-
Example: I split out all of the logic for reading my program's config file into its own crate. This is great, since only the main binary actually depends on this behavior. All of my database adapters, currency exchanging functions, my schema, etc, don't need any of that to compile. It really helps with reusability and separation of concerns.
-
Also, often when I use a dependency (and if it is viable to do so) I will write helpers around it so that if I change the dependency later, the odds of me having to change everything depending on certain functionality goes down.
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Trying to solve this exact issue I always end up with a bunch of modules, each with it's own message processing loop, and using crossbeam or Tokio channels to communicate with each other. Something like this: https://github.com/Asapin/alkonost/blob/master/chat_poller/src/lib.rs
Related posts
- [Looking for code review] Small CLI app that tries to detect spam in YouTube chats
- YTerMusic a0.0.10 pre-release: An in terminal youtube music client with focus on privacy, simplicity and performance
- YTerMusic 0.0.6 - A full rust Youtube music TUI with local music caching for offline use.
- YTerMusic 0.0.6 - A full rust Youtube music TUI with local music caching for offline use.
- Personal server instance help