azymohliad / watchmate

PineTime smart watch companion app for Linux phone and desktop
GNU General Public License v3.0
136 stars 4 forks source link

Can you support Windows OS? #21

Closed ProgramminCat closed 1 year ago

azymohliad commented 1 year ago

No, unfortunately that'd bring too much complexity to deal with for such as small app.

First of all, the Bluetooth stack. WatchMate uses Bluez, which is Linux-only. Adding Windows support would require to abstract away from platform-specific Bluetooth stack: either by implementing the abstraction layer manually, or by using a third-party library that does that. The first option is a huge amount of work, and a maintenance burden. The second option takes away direct control of the platform specific API, so it might not expose some useful functionality or make Bluetooth issues harder to debug; it might bring some extra bloat and bugs; and it's still quite a lot of work. The only cross-platform Bluetooth library for Rust I'm aware of is btleplug. For Bluez it doesn't use its official Rust bindings but rather something less popular, so I'd expect it to be less polished on Linux.

Second, host integration functionality, such as media player control and notification forwarding. These things are very platform-specific. WatchMate uses Freedesktop APIs for this (which is specific to Linux and some other Unix-like OSes). I couldn't find any cross-platform libraries in Rust for this, so it would require to implement an abstraction layer manually. In future there might be more things that require tight platform integration (it's a companion app after all). So committing to cross-platform support might slow down the development later too.

To sum up, it is technically possible, but requires a lot of work. And even if there were people willing to take it, I'm not sure it'd be reasonable. A big part of functionality would need to have alternative implementations for each platform, to the point that it might make more sense to have an alternative app for another platform.