Our great sponsors
-
bloom
The simplest way to de-Google your life and business: Inbox, Calendar, Files, Contacts & much more (by skerkour)
-
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.
Hi, I'm not a video game programmer, I mostly do network and web programming, but I do exactly this in Rust and it works very well. Here is an example for a mailer driver, which is a trait and then implemented for multiple "backends" such as AWS SES or SMTP https://github.com/skerkour/bloom/blob/main/bloom/kernel/src/drivers/mailer/mod.rs.
Also you could use an existing cross-platform graphics library, e.g. wgpu-rs. It supports Vulkan, Metal, DirectX, OpenGL and WebGPU. Oh and it seems to allow switching backends at compile-time via the WGPU_BACKEND environment variable, so maybe check out how they're doing it.