Rust Constructor V2
A cross-platform GUI framework built on egui, the simplest way to develop GUI projects with Rust
English | 简体中文
Rust Constructor is an open-source project, but it has no direct relationship with the egui development team!
Table of Contents
- Version Update Information
- Introduction
- Quick Start
- Purpose of Creating Rust Constructor
- FAQ
- License
- Epilogue
Version Update Information
- Current latest version is
v2.8.0 Three Core Principles.- This update introduces improvements centered around three key aspects: "Multiple Dimensions", "Fast Execution", and "Ease of Use".
- Modified
modify_tagsdefinition inRustConstructorResourceto support optional clearing of existing tags; - Extracted
positionandsizefromposition_size_config, added new methodsdisplay_positionanddisplay_sizeinBasicFrontResource; - Removed event system and all associated components;
- Reintegrated
Rust Constructor ExtraintoRust Constructor(i.e., added three new resourcesBackground,Switch,ResourcePanelwith their corresponding methods); - Split color property into separate
colorandalphafields; - Removed
truncatefromText, now enforces text truncation withauto_fitparameter controlling render layer sizing behavior (whethersizereflects actual text dimensions or bounding box dimensions); - Enhanced
ResourcePanellayout system - layout strategy can now be defined internally withinResourcePanel; - Implemented scrollbars for
ResourcePanel; - Fixed layout corruption issues in
ResourcePanel; - Resolved several known bugs.
- Modified
- This update introduces improvements centered around three key aspects: "Multiple Dimensions", "Fast Execution", and "Ease of Use".
Introduction
Rust Constructoris a Rust graphical development library built on egui, including commonly used functions such as timers, resource storage, and error handling.Rust Constructorreleased its first version in2025.2, and today'sRust Constructorhas undergone earth-shaking changes compared to that time.
Quick Start
- To introduce
Rust Constructor, please addrust_constructor = "x.y.z"(please replace xyz according to your needs) totoml. - If you want to start
Appand perform some simple operations, it is recommended to refer to the official documentation of egui. - You can refer to the official tutorial of
Rust ConstructorRust Constructor Guide.
Purpose of Creating Rust Constructor
We encountered some problems that egui could not solve during the development of Targeted Vector, so we expanded many tools. In order to allow more people to develop conveniently, we created Rust Constructor.
FAQ
-
Q1: Which platforms does
Rust Constructorsupport? -
A1:
macOSandWindowshave been confirmed to be fully supported, and other platforms depend oneguisupport. -
Q2: What is the difference between
Rust Constructor V2andV1? -
A2: The original architecture was modified to conform to the structure of the library
crate, published on crates.io, and added an official guide. -
Q3: Why do I get an error when calling a resource?
-
A3: Please ensure that you have added the resource through the
addmethod and there are no spelling errors. -
Q4: How to modify resources?
-
A4: Take out the resource through
get_resource_mut. -
Q5: What should I do if I encounter unknown error prompts?
-
A5: Prioritize checking the
RustConstructorErrordefinition in theRust Constructorsource code, find the problem you triggered and correct it. -
Q6: Why is there only
V2ofRust Constructoroncrates.io? -
A6:
Rust Constructor V0andRust Constructor V1are essentially bloated projects with many redundant functions and meaningless code, so they were not released.
License
MIT © 2025 ChepleBob
Epilogue
If you like this project, please give me a star on GitHub. You can also join our organization Binder.