Closed crsaracco closed 4 years ago
I'm not a fan of having an example with conditional compilation inside of it. Can we move this one layer down?
For the #[cfg]
spam, we could learn from winit:
https://github.com/rust-windowing/winit/tree/master/src/platform_impl
I feel like the sooner we deal with conditional compilation for platform specificity (in a clean way), the better it's going to be down the road.
Also, thank you for the CI!
Edit:
Ok, I've checked #6. Seems like a step in the correct direction.
I'm not a fan either, but I figured we'd get to it when we unified the API. My main goal here was to spin up some CI so that we don't accidentally/unwittingly break it in the future :)
All of the
#[cfg]
spam can be cleaned up when we unify the API between the three platforms.The most common way I've seen to do this is the "platform" pattern: rtb-rs, druid.