These days that's a lot less of a concern than it used to be. It is a lot of up-front work to facade e.g. Metal, Vulkan (and even D3D12) but it's much much much easier than back in OpenGL vs D3D9/10 days.
Most of the general concepts are more or less the same across them all these days. The "shapes" of the APIs are very similar.
A texture is a texture is a texture. Same for a vertex/index/uniform buffer, vertex/fragment/compute shaders (notably not geometry, but you can just use compute), etc.
Unfortunately, graphics is in many ways the easy part. Really excellent integration with system menus, preferences, keyboard, input method editing, all have more variation across platforms and a still-evolving story of solid Rust abstractions. Lately, we've decided to try joining forces with the winit project to see if we can get those problems solved well.