-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
niri ipc support #8
Comments
since the ipc is it's own create, couldn't the lib be written in rust and use the ipc create rather then reading from the socket like you'd normally do |
The current IPC protocol is simple enough that it's easy to at least put together an EventStream implementation in Vala, which I've been working on. Using the official crate would be great, but my main concern would be thread safety, considering that the crate uses blocking I/O, whereas a Vala implementation can benefit from GLib concurrency |
The "hard" part is the state management. While the crate has that implemented, it would have to be wrapped as a gobject, so you can bind to it. You have to check what changed and set the gobject properties accordingly. So you basically have to do the state management yourself anyway. The only thing that could be used from the crate is the reading from the socket part, which is easy to implement in vala. Using the crate therefore provides only little benefit, but introduces a lot of overhead to make it usable as a gir lib. not worth it IMO. |
I was working on an implementation a few weeks ago, but stopped working on it since I'm trying other compositors. It's mostly complete but the signals could use some work: https://github.com/spazzylemons/astal/tree/niri |
https://github.com/YaLTeR/niri/tree/main/niri-ipc
https://github.com/YaLTeR/niri/wiki/IPC
especially
EventStream
which is available in 0.1.9 (latest release)The text was updated successfully, but these errors were encountered: