Rust Constructor V2
A cross-platform GUI framework built on egui, the simplest way to develop GUI projects in Rust
English | 简体中文
Rust Constructor is an open-source project, but is not directly affiliated with the egui development team!
Table of Contents
- Version Update Information
- Introduction
- Quick Start
- Purpose of Creating Rust Constructor
- Frequently Asked Questions
- License
- Conclusion
Version Update Information
- The current latest version is
v2.2.0 Health Update. Major updates include:- Improved creation methods for some structs.
RustConstructorResourcenow supportsDebug.- The
reg_render_resourcemethod ofRustConstructorResourcecan now be automatically implemented. RustConstructorResourceextends two methodsas_anyandas_any_mutfor type conversion.ImageandImageTexturenow implementDebug.- Added
DebugTextureHandlestruct to implementDebugforImageTexture. RustConstructorErrornow implementsDisplayandError, and added two new error types:ImageTextureNotFoundandRectNotFound.- Fields
pageandvertrefreshinAppare now renamed tocurrent_pageandtick_interval. - The storage content of
rust_constructor_resourceis nowVec<Box<dyn RustConstructorResource>>. - Extensively improved error handling.
- Removed
get_resource_index. - Added
get_resourceandget_resource_mutmethods to directly fetch resources from the list and operate on them. - Added
replace_resourceandreplace_resource_custommethods to replace specified resources from the list. - Modified many methods to adapt to the new storage approach.
- Added
problem_report_custommethod for custom problem reporting lists. - Removed some functions and methods with low relevance to
Rust Constructor.
Introduction
Rust Constructoris a Rust GUI development library built on egui, including common features such as timers, resource storage, and error handling.Rust Constructorreleased its first version in2025.2, and today'sRust Constructorhas undergone earth-shattering changes compared to that time.
Quick Start
- To introduce
Rust Constructor, please addrust_constructor = "x.y.z"(please replace xyz as needed) to yourtoml. - If you want to start
Appand perform some simple operations, it is recommended to refer to the official egui documentation. - Due to the large content and complex operations of
Rust Constructor, it is inconvenient to fully describe here. You can refer to the official tutorial ofRust 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. To enable more people to develop conveniently, we created Rust Constructor.
Frequently Asked Questions
-
Q1: Which platforms does
Rust Constructorsupport? -
A1:
macOSandWindowsare confirmed to be fully supported, other platforms depend oneguisupport. -
Q2: What are the differences between
Rust Constructor V2andV1? -
A2: The original architecture was modified to conform to the
cratestructure, published on crates.io, and added an official guide. -
Q3: Why do I get errors when calling resources?
-
A3: Please ensure you have added the resources through the
addmethod and there are no spelling errors. -
Q4: How to modify resources?
-
A4: You can retrieve resources via
get_resource_mut. -
Q5: What should I do if I encounter unknown error messages?
-
A5: First check the
RustConstructorErrordefinition in theRust Constructorsource code, find the problem you triggered and fix it. -
Q6: Why is only
V2ofRust Constructoroncrates.io? -
A6:
Rust Constructor V0andRust Constructor V1were essentially bloated projects with many redundant features and meaningless code, so they were not published.
License
MIT © 2025 ChepleBob
Conclusion
If you like this project, please give me a star on GitHub. You can also join our organization Binder.