Our great sponsors
-
mini-redis
Incomplete Redis client and server implementation using Tokio - for learning purposes only
Have a look at https://github.com/tokio-rs/mini-redis, written as an example of a modern rust application.
-
I don't think your service should be mutating(which allows passing it around with few issues), and the first reason I can think for it doing so is using a hashmap as a database. In that case, you can wrap the hashmap into a mutex instead. Or better yet, find a thread aware structure that solves the problem from crates.io. If you have lifetime issues with it needing to be 'static(likely with some web frameworks) you can probably leak() your service and make it so. Assuming the same instance is used throughout the app's lifetime.
-
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.