rdev icon indicating copy to clipboard operation
rdev copied to clipboard

Add version of listen which doesn't run new CFRunLoop

Open serhii-tokariev84 opened this issue 3 years ago • 8 comments

serhii-tokariev84 avatar Jan 29 '22 19:01 serhii-tokariev84

With this PR I was able to use the library in a Tauri app. Works well so far. Thank you!

Leksat avatar Aug 27 '22 17:08 Leksat

This would need to be done for ALL oses unfortunately, this is afaik, impossible. :(

Narsil avatar Nov 11 '22 10:11 Narsil

Any chance this gets merged anytome soon? I'd love to try it out

medzernik avatar Nov 16 '22 17:11 medzernik

No this will not get merged as it would be only available for MacOS, but by all means check out the branch and try it out !

Narsil avatar Nov 17 '22 09:11 Narsil

though i think this can't be used with tauri on cross-platform apps anyway.. i'll try to think of a different solution

medzernik avatar Nov 18 '22 00:11 medzernik

though i think this can't be used with tauri on cross-platform apps anyway.. i'll try to think of a different solution

Why cannot it be ? Tauri is just an app, as long as you respect the threading requirements it should work on all platforms Tauri or not Tauri. I used this crate to build an electron app and it worked just fine.

Narsil avatar Nov 18 '22 09:11 Narsil

though i think this can't be used with tauri on cross-platform apps anyway.. i'll try to think of a different solution

Why cannot it be ? Tauri is just an app, as long as you respect the threading requirements it should work on all platforms Tauri or not Tauri. I used this crate to build an electron app and it worked just fine.

would you have some sort of example? im not sure that it would work with the architecture i have currently setup.

medzernik avatar Nov 18 '22 11:11 medzernik

Not with Tauri, and it's been a long time since I used the electron app tbh.

The main issue was being on the main thread (which is required by MacOS). I'm telling all this from memory so I might be wrong.

Worst case scenario, that I started with was having a dedicated process for the listening part, and communicating with the electron app through your favorite cross process communication.

Narsil avatar Nov 18 '22 11:11 Narsil