New Control Panel with Flutter #87
Replies: 3 comments 5 replies
-
Hi! First of all, thank you for your effort and willingness to contribute! I'm not fundamentally opposed to going this direction, but I have a few questions/thoughts first:
|
Beta Was this translation helpful? Give feedback.
-
I took a look at this, and the project looks like a viable path forward. The project is actively maintained, well developed, well used, and has a lot of attention (and makes ffi easier). I can handle all the ipc, callbacks (and even registry stuff) in the plugin and make it easy to use on the dart side, so the app can focus mostly on the actual ui.
Sounds okay then!
Putting some logic in a library is pretty easy to do (and in fact, I prefer it since it cleans up the logic in a nice area, without having to try to reinvent things in new languages; hmm, on a another thought, maybe I should crate python bindings to make it scriptable). In any case, the reason the driver doesn't do it is simply because it can't. Drivers are heavily restricted in what they can and can't do with the registry, and it's very complex when it gets to writing (at least for umdf drivers, not sure about kmdf drivers). Reading however is easy enough to do. However, in a separate library, it's very easy to write to the registry, so handling this elsewhere is pretty ideal compared to the alternative. After taking a look at this and the possibilities, there looks to be a viable path forward! I think I am interested yes. And I'd be happy to collaborate and take care of all the Rust ipc/driver logic side of it. |
Beta Was this translation helpful? Give feedback.
-
OK, nice! Let's do this then!
That's a bummer! But Ok.
I think C bindings would also be beneficial as well, since C-style ABIs are the golden standart to make interop possible and almost any language has some form of support for it. Maybe there is a somewhat simple solution using cbindgen? I know that it is always a hassle to do, when you have to pass around dynamically sized data structures... Or it may be easier to create C++ Bindings instead using the cxx rust crate? I imagine a core IPC library written in Rust, which has different language bindings built on top of it. I propose the following roadmap:
The API should be unbiased from the actual IPC protocol. The pipe name should not be completely hardcoded into the library, but rather default to the standard name. Do you want to notify the client of changes in the configuration or other events? Maybe you can support multiple clients. So for example, if you use the Control Panel and the CLI at the same time, every client gets notified when the configuration changes. This also ensures that the state of the Control Panel always reflects the correct state of the driver. I can do the API spec for Dart. |
Beta Was this translation helpful? Give feedback.
-
Since it seemed like you are a bit uncertain, which framework suits this purpose well, I've gone ahead and put in a day of work, to build a prototype with Flutter:
2024-02-14.09-37-35.mp4
I have used the fluent_ui package, so it looks similar to what you have already implemented using WPF.
I've also gone ahead and integrated it into the installer.
I think Flutter serves this purpose well, because it has good performance and a very good and easy development experience. It builds to a small application package and does not have dependency hell.
The Dart programming language has a similar ecosystem than Rust, while being similar to C#, but with more polished language features and good type safety (sound null safety). Recently, it also got new powerful functional programming features, like pattern matching, similar to Rust. Sometimes, I like to call it "Managed Rust".
Source: https://github.com/Dampfwalze/virtual-display-rs/tree/control-panel-flutter
I have published a release with this Control Panel
I am curious about your opinion and if this interests you, I can develop this a bit further and open a PR.
Beta Was this translation helpful? Give feedback.
All reactions