gtk-rs
DISCONTINUED
arewegameyet
Our great sponsors
gtk-rs | arewegameyet | |
---|---|---|
45 | 99 | |
510 | 670 | |
- | 0.7% | |
8.6 | 7.0 | |
25 days ago | 10 days ago | |
Rust | SCSS | |
MIT License | Creative Commons Attribution 4.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gtk-rs
-
Counter App with GTK4 and Rust
gtk-rs
-
Rust GUI Development?
GTK: I have little - no experience with GTK, and from what i have read it is cross-platform similar to wxWidgets, however is an emulated UI system similar to Qt. As i have no experience with it i am not sure how well supported this library is as far as it's Rust - bindings are concerned gtk-rs
-
gtk-rs: can't get window ID with command inside connect_show or connect_realize
In a gtk-rs application, I'm running a xdotool command to get the id of the application's window. I'm running the command in a connect_show closure (after the window has been shown):
-
My (challenging) experience building a window switcher for Ubuntu
To build the UI, I used gtk-rs. My experience with this library was quite pleasant; it was easy to use and there were a lot of examples. However, it isn't as widely used as, say, React, so it was difficult to find answer on Stack Overflow (I come from a JavaScript/Typescript background).
-
x11rs can't access window created with gtk-rs
I'm using x11rb to interact with a window created with gtk-rs. window_id is the ID of the window created with gtk-rs. window_id_2 is the ID of the window created with x11rb (for testing purposes).
-
What GUI libs are out there and good to use?
I haven't used it yet, but gtk-rs looks pretty good too. I've used GTK in general, just not the Rust bindings so far. The tutorials seem nice and GTK is a good UI toolkit overall.
-
Who "owns" Rust ?
For GTK, there's https://gtk-rs.org/
-
gtk-ks: Join the Effort to create GTK Bindings for Kotlin!
Out there there are already some open source projects trying to do this, but most of them are abandoned or in a very alpha stage. The most promising project so far seems to me git-kt. This project is trying to do something similar to what gtk-rs does for Rust, which is using GObject Introspection (GIR) files to generate Kotlin native bindings automatically.
-
What are the pros/cons of the best GUI options for a cross platform app in Rust?
Currently, I have narrowed potential libraries to: 1. Flutter 2. FLTK 3. Relm (GTK) 4. iced 5. Slint 6. Imgui, Imgui-rs 7. and gtk-rs
-
Hey Rustaceans! Got a question? Ask here (4/2023)!
and gtk-rs
arewegameyet
-
Egregoria is a city simulation with high granularity
I think Rust for games has come really far. I will cite https://arewegameyet.rs/ "Almost. We have the blocks, bring your own glue.".
All the blocks are there and the language is really well suited to games.
On top of my head:
The pros:
- The crate ecosystem and the package manager makes it really easy to integrate any useful component such as pathfinding, spatial partitioning, graphics backend, audio system.. Most crates take a lot of effort to be cross-platform so I can develop on linux and not spend too much time debugging windows releases.
- The strong typing and algebraic data types makes expressing the game state very pleasant. I also found I was able to develop a very big game without too many bugs even though I don't write many tests.
- Ahead of time compilation + LLVM guarantees you won't have to optimise for weird things around a virtual machine. Rust gives you more control to optimise hot loops as you can go low-level.
- I find wgpu to be the perfect balance between ergonomics and power compared to Vulkan. OpenGL support through wgpu is also a nice addition for lower end devices.
- The Rust community is very helpful, you can often talk directly to crate maintainers
The cons:
- Compilation times, when compared to JITed languages such as C# can be very painful. It can be alleviated by buying a 3950X but I still often get 10-30s iteration times.
- The static nature of Rust means you often need a dynamism layer above to tweak stuff that can be awkward to manage. I made inline_tweak for this purpose but it's really far from how easy Unity makes it. https://github.com/Uriopass/inline_tweak
- Since Rust feels very ergonomic, you are tempted to write almost all game logic within it, so mod support feels very backwards to implement as you cannot really tweak "everything" like in Unity games. Thankfully "Systems" game like Factorio or Egregoria can be theoretically split into the "simulation" and the "entities" so mod can still have a great impact. Factorio is built in C++ so has the same problematic. Their Lua API surface is quite insane to be able to hook into everything. https://lua-api.factorio.com/latest/
Now, I have to talk about Bevy: https://bevyengine.org/. It did not exist when I started but it is a revolution in the Rust gamedev space. It is a very powerful 100% Rust game engine that makes you write game code in Rust too. It has incredible energy behind it and I feel like if I'd used Bevy from the start I wouldn't have had to develop many core engine systems. Its modular design is also incredibly pleasant as you can just replace any part you don't like with your own.
- What is Rust's potential in game development?
-
Struggling to find practical uses for Rust
For practical uses of Rust? Whatever you want to program. People use Rust for game development, GUIs, web dev, and more. Anything where abstraction, speed, concurrency, memory safety, etc. are important, Rust will probably be a good fit.
-
Latest Zen Kernel......
Are we game yet? "Almost. We have the blocks, bring your own glue"
-
Really frustrated. [Warning: Bit of a negative rant]
Not seeing anything else that's close to photo realistic. I'm hitting the tough bugs first all too often. More than half my time has been spent on ecosystem problems.
-
What are some stuff that Rust isn't good at?
I also know of https://arewegameyet.rs/
-
Chrome ships WebGPU, a sort-of successor to WebGL. How soon do you see this being adopted by the game dev community?
Yes — and in fact, Firefox's implementation has been the go-to graphics API for folks trying to make Rust gamedev happen for a long time now. Bevy Engine's renderer is built on it, for example.
-
Are We <Thing> Yet?
They're all/mostly websites about the state of the Rust language ecosystem. For example, can you write games in Rust (https://arewegameyet.rs/) or what's the state of the async (https://areweasyncyet.rs/)
-
Drew a triangle by following Vulkan tutorial, but I understand almost nothing. Where do I go from here?
Now comes the most controversial part of my answer: learn Rust. I cannot convey in works how insanely unfriendly the C/C++ world is to inexperienced programmers. This may sound counterintuitive, because the same can be said about Rust, but not really. It's much easier to get started with Rust and finish your first project than it is to learn how to manage, build, and maintain even the smallest of C++ projects. But this isn't why I'm asking you to migrate to rustland. My reason for suggesting so is WebGPU. WebGPU is probably the best modern graphics API that's also incredibly well-documented and beginner-friendly. For this reason I believe it to be the #1 API for beginners going forward. Rust has an increasingly great WebGPU story and graphics ecosystem. If this doesn't convince you, that's also ok. There's a beginner-friendly wrapper course for the Vulkan tutorial that you're following so you can go on with your Vulkan journey after you've done some exploring. Note that this course is incomplete and kinda in the middle of a hiatus, but what's there is more than enough to get you started.
- Rust – Are We Game Yet?
What are some alternatives?
iced - A cross-platform GUI library for Rust, inspired by Elm
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
egui - egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
fltk-rs - Rust bindings for the FLTK GUI library.
gtk4-rs - Rust bindings of GTK 4
Godot - Godot Engine – Multi-platform 2D and 3D game engine
Slint - Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint]
Windows UI Library - Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
RG3D - 3D and 2D game engine written in Rust [Moved to: https://github.com/FyroxEngine/Fyrox]
sciter-sdk - Sciter is an embeddable HTML/CSS/scripting engine
bevy - A refreshingly simple data-driven game engine built in Rust
Gtk4-tutorial - GTK 4 tutorial for beginners