I've been using a new program called RetinaRelay[0] to use my 5k iMac as a second display for my M1 Macbook using an ethernet (or Thunderbolt for even better performance). Works brilliantly. It's definitely higher latency than a normal monitor (my ethernet connection is 45ms vs 5ms for a monitor) but it's not noticeable for coding and miles better than remote desktop or similar.
Thank you. I have been looking for something like this for a long time. My 27” 2015 iMac is getting very long in the tooth, but that 5k screen is still beyond beautiful.
I'm pretty sure it relies on Mac APIs like Metal and ScreenCaptureKit but it's worth reaching out to the developer. He was very responsive when I requested features, and it may be a lot easier to build a windows application that adheres to the protocol using agentic development.
You actually can use most bluetooth apis in websites on most browsers outside of iOS [0]. I used recently this tool [1] to program my baofeng radio and the bluetooth aspect of it worked great, but I did end up having to reverse engineer aspects of the payload to get it encode and decode all the channel configuration correctly.
[0] https://www.retinarelay.com/