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
Discussion: maintainer change #392
Comments
Weakly throwing my hat in the ring. I'm probably not the best candidate since I'm no longer as active in the gamedev space, but I have had plans in the past for it and would be more than willing to take it up.
|
@Gekkio I might also be interested in maintaining this crate. I would also be 100% on board with co-maintaining with @thomcc (if they want), as this crate has a lot of open issues and PRs.
I've been wanting to work on a GUI toolkit in Rust, but most of existing toolkits have different goals than I. I think this code base could be a good start - immediate mode GUI is seems like a good idea (and I like that it doesn't depend on any specific graphics backend). As for grand plans, I would want to re-write the entire C++ code dependencies into pure rust (making this crate no longer bindings, but rather a re-write into Rust). Luckily, I enjoy converting C/C++ to Rust. This crate could have a new home in the libcala organization that I started (since you mentioned you'd like it to be part of an organization). I would also be interested in improving the documentation and adding tutorials, as a at quick glance I'm struggling to figure it out (I'll figure it out, though, I'm sure). Also, if it doesn't currently work on mobile, I would need to change that. I would also add an additional focus on accessibility.
No, but if I started maintaining it I certainly would (it solves issues I need solved, although I also would like it solved in pure Rust).
I currently maintain a crate called cala. I think it could be possible for cala to be used with imgui-rs, although I haven't tried yet. Cala currently provides cross-platform hardware support for various things like audio, graphics, gamepads, input, etc., but it's missing GUI widgets (one difference between Cala and other crates that solve similar issues, is that it's asynchronous, but also more modular). Cala is a project that I started myself, that includes most of the crate's dependencies (minus chrono). I have a lot of experience writing FFI code and maintaining somewhat popular crates, and I'm also working on a video game in Rust using cala, as well as other applications that need both a GUI and features from cala. |
I'm not really interested in working on a rewrite so much as bindings to the existing library. I think there's value in having bindings, since there's a lot of plugins to https://github.com/ocornut/imgui that it would be nice to support too. These wouldn't be compatible with a Rust rewrite. |
Maybe then it should stay bindings, and perhaps I'm not the person for the job. I don't really see any documentation on plugins after doing a quick search, or even if this crate supports them, but I'll take your word on it. After reading about some of the author's design decisions, I think it would be likely closer to how they wanted it to live on if you were the maintainer instead of me. |
They're mostly just C++ code that gets compiled in. They aren't supported by the current version of the crate. I'd like to do a survey of the more popular ones (I know bgfx used to have a few) and consider bundling them as features if they're worthwhile. The docking branch is also arguably plugin-esque, but it requires a big change to the internals IIRC. That said, it's not a big deal. I agree that keeping it bindings rather than a rewrite feels more in spirit with what the crate is currently, although a rewrite would certainly be an interesting project. |
One example of such a plugin is ImPlot, which is requested in #384. More generally: https://github.com/ocornut/imgui/wiki/Useful-Widgets has a lot of things, many of which are good, although some of which are likely impossible to adapt in a general way. Another issue I've had with Rust ImGUI in the past is ImString/im_str being kind of awkward and painful. I have some plans for this, as I have similar issues in
That said, it's been a while, I don't remember if Dear ImGUI cares about pointer identity of the strings for its internals, and if so the 2nd approach wouldn't work. |
I recently wrote bindings for a node editor (https://github.com/benmkw/imnodes-rs) (not published) because I liked https://github.com/4bb4/implot-rs very much.
I disagree because wrapping a c like interface in rust made it much easier to use in the case of imnodes and I also think your API is nice and enjoyable (of course imgui/ imnodes/ implot being c-like only made it possible to port them in the first place). To reduce maintenance burden I would suggest to remove the backends from this repo and move them to their own repo such as https://github.com/Yatekii/imgui-wgpu-rs and maybe use the same org for all of them. Thus updates don't need to happen at the same time but its still somewhat connected. The goal would be to make it possible for the people maintaining imgui-rs to not worry about the backends so much (if a backend only works with an older version its not a big issue) and also push more work onto the users (don't provide backwards compatibility so much). I would reconsider adding a docking feature branch as from my point of view thats the only/ the major next API consideration which needs the most attention, apart from that imgui is not moving super quickly. Of course this cuts into the maintenance budget which is why it was not done. Web: Utilities:
For me imgui-rs was really pleasant to use, its by no means perfect but its a great baseline and provides an easy to use gui for rust today. Thus I think its valuable to build on top of a much used gui lib at the moment although this will hopefully be superseded at some point.
Thats basically true for me as well, I just want to get something to work and show friends ... a simple tool thats easier to use than a terminal and imgui does just that. The following is wip but compiles today and I think thats pretty nice and basically replaces matplotlib for simple things for me: fn main() {
let plotcontext = implot::Context::create();
imgui_wgpu::simple_api::run(Default::default(), plotcontext, |ui, plotcontext| {
imgui::Window::new(im_str!("example"))
.build(&ui, || {
let plot_ui = &plotcontext.get_plot_ui();
implot::Plot::new("Simple line plot")
.build(plot_ui, || {
let x_positions = vec![0.1, 0.9];
let y_positions = vec![0.1, 0.9];
implot::PlotLine::new("legend label").plot(&x_positions, &y_positions);
});
});
});
} This is not really an application, just my thoughts because I got a little bit involved with the plugin and backend stuff and am also using the lib. |
Thanks to everybody for the comments! 😄 Let's keep this issue open for a couple of days to see if we get more comments and/or potential maintainers. Based on the comments so far, I think @thomcc seems like a promising candidate for the next maintainer. |
On the topic of string view / non-null terminated strings, on Dear ImGui side we've been eying all year at making the switch toward using string-view like (aka a pair of pointers, not requiring null termination), based on existing work from @bitshifter which we updated and tweaked. For whoever ends up taking over imgui-rs this could be a good project to undergo together (it involves cimgui as well). From what I understand this would be notable improvement for imgui-rs users. |
For the org part, the Amethyst org could act as the neutral host to help with coordination and contributor on-boarding. We’ve done the same thing for other projects like rlua, specs, atelier-assets etc. Former and active maintainers would have Owner privileges on the repo; our role would merely be administrative. And @Gekkio you would always have the option to move the repo again should you wish to do so. |
This is great news! I would be very excited to help out here. I'm familiar enough with C++ (I mean, I use it more-or-less daily at work) that I can help on that side if needed too.
I wouldn't be opposed to this, but I do worry it would lead people to thinking it required Amethyst to use. Maybe not though, I haven't heard of issues there with the other projects. The other risk is if Amethyst dies out, the projects are under an org that doesn't inspire confidence — You see this with projects under the PistonDevelopers org, even if they're maintained (https://github.com/PistonDevelopers/glfw-rs, for example). When I took over rusqlite I just made a new org (which all the previous and other current maintainers have control over as well), which is what I planned to do here if I'm chosen as the maintainer. That said it does come with other benefits, such as visibility and the like so I guess it's hard to say. |
So, I spent some time and wrote up some further things I'd like to do if I end up maintaining this crate. Not all of these are fully thought out — some are downright half-baked, but it should at least give you an idea of some of the stuff I'm thinking about and am interested in. This is all in addition to the stuff I mentioned already, and isn't really in any order, although clearly some is. Familiarizing
Making the core/platform/renderer relationship more explicitAs I see it, there's basically three pieces users need to wrangle to use
This is highly decoupled and clean, but can be a bit tricky to wrangle since no part knows about all the other parts. I'd like to make the platform/renderer responsibilities and api a bit more explicit (ideally as After this, perhaps even provide a To a certain extent we have something like this in the imgui-examples support code, although it also demands a lot more control over the application than I think is good for a library like imgui, so would need adjusting. More directly supported renderers / platform crates.Some things that in the past have stopped me from using ImGUI in projects:
I also will probably reach out to the maintainers of any of these that are active, and try to find out if there are any particular issues, if they want to keep maintaining it or would rather see it integrated, if they want to collaborate on it in other capacities, etc. Wider target support (or better docs for it where it's already supported)
Wild dreams
Minor stuffThese are teeny, but I got a bit excited and started did these these in the
|
I'm not sure if you mean Rust or core imgui side, but a pull-request for a imgui_impl_wgpu renderer has been submitted this week in the main imgui repo. It's reasonably clean and I expect it shouldn't take too long to finish (see ocornut/imgui#3632)
Library unfortunately isn't designed for that so currently only a mutex would work. I'm not aware of UI libraries that support parallel write/append. The only thing which is possible is having multiple imgui contexts (in situation where e.g. you want a "render thread" vs "update thread" imgui). For that specific use case I expect down the line to provide utilities to facilitate compositing of multiple contexts (input wise and maybe facilities such as cross-context drag and drop). |
Ah, I'm not trying to change the C++ Dear ImGUI library here either, so much as thinking of improvements to the Rust bindings to it. Sorry that wasn't more clear.
Rust side, since in practice Rust code will end up wanting this. I think we don't currently use any of your
Yeah, I'm aware.
I suspect in the no-contention case this would be fine, since Taking a mutex around every call could easily result in mismatched begin/end — we'd have to hold it the whole time the window is built probably. I think this would work — I suspect in practice contention is low, Rust just requires there to be a mutex to avoid the chance of data races (which would be memory unsafe). Note that some of this might already exist — I noticed there is a global mutex in the rust bindings, but I'm not exactly sure when/where it's taken (yet). That said, this is not really ideal still. Plenty of Rust entity management libraries will run your code on whichever thread is convenient. It would be nice for imgui to work there, but yeah, gui libraries almost never do. One thought broadly I had was, perhaps there's some cleverness we might be able to do on the Rust end here where calls get sent through a channel to imgui. Obviously naively this wouldn't work as-is, since the communication is bidirectional, though.
Yeah, I see. I had assumed this was mostly impossible with how the library worked, but hadn't dug into it much, hrm. |
I think it's pretty clear now that @thomcc has the right skills and a lot of good ideas for imgui-rs, so...the job is yours 😄 🎉 About the mutex: 99% of API functions in Dear ImGui operate using a global mutable static context which can be switched. In imgui-rs, this is modeled using "active" and "suspended" contexts, so you can have multiple context structs but only one of them can be active. Operations that switch the active context are behind the global mutex, but API functions that use the active context (99% of the API) are not, because just by having a About |
And it's done! I hope everybody is happy with the direction I take |
I've decided to stop maintaining imgui-rs, because honestly it feels like 100% chore at this point without any fun. The ratio used to be a bit different earlier when there were interesting technical challenges 🙂 but now many of those are solved and I mostly face annoying technical challenges caused by choices I can't influence, and I keep having to spend time trying to defend the choices I have made.
Simply put, there's so many other projects I'd much rather spend time on...I've never been especially passionate about user interfaces since my own needs are very simple and I don't think Dear ImGui is that great from a Rust perspective, no matter if it's wrapped by current imgui-rs implementation, or some hypothetical better alternative wrapper.
From a practical point of view, I think the repo needs to be moved under some organization and I need to give crates.io release rights to somebody. What happens after that is 100% up to the next maintainer(s) 😄 personally I will be probably switching to
egui
in the few projects that currently useimgui-rs
Let's discuss here who wants to be the new maintainer(s)!
If you'd like to maintain imgui-rs, please answer the following three questions. This is not a "job interview" and there's no strict requirements, but I'd like to have some idea who I'm passing the torch to 🙂
Maybe you have some grand plans for imgui-rs? Or maybe you currently use it and just want it to be actively maintained? It would be nice to know why you're interested. I have never been very passionate about imgui-rs and have managed to maintain it for years, but some passion probably helps if you want to be a good maintainer.
It's not a strict requirement, but I think it's so much better if you use the thing you maintain, so I'd like to know if you use imgui-rs and how you use it. One of my own problems has been that I don't actually use imgui-rs very much, so I don't get to experience all pain points from a user point of view.
No need to have a master's degree in user interfaces, games, or unsafe code 😄 But I'd like to know if you already maintain any crates related to game development or have some other relevant skills which would be useful with
imgui-rs
.The text was updated successfully, but these errors were encountered: