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
- The current latest version is
v2.7.0 Set Things Right. The main updates include:- Removed the issue reporting mechanism and all related content;
- Removed the safe mode mechanism and all related content;
- Added
render_layer,active_list,render_list,event_list, andevent_mapto adapt to the new rendering mechanism; - Removed
MouseDetector,Switch,MessageBox,ResourcePanel, and all related content; - Added a rendering queue mechanism, where calling resources will first add them to the rendering queue and render them uniformly when the page refreshes;
- Added
request_jump_render_listto allow resources to skip the rendering queue and render in advance; - Added an event handling mechanism, which sends events to the event list when you try to load external library resources, waiting for the external library to process them;
- Added
quick_place, supporting automatic addition and execution of resources; RustConstructorResourcenow addsdisplay_display_info,modify_display_info,display_tags, andmodify_tagsmethods for quickly obtaining or modifying resources;- Modified some methods of
BasicFrontResource; - Added
RustConstructorResourceBoxfor encapsulating resources intoApp; - Added
RustConstructorId, containing resource name and type; - Added
BasicFrontResourceConfigfor quickly setting styles of basic front-end resources; center_displayis now renamed todisplay_method;PositionConfigis renamed toPositionSizeConfig, and addedpositionandsizefields;ReportStateis now renamed toEventState;- Removed
ProblemandSeverityLevel; - Added
NeedPlaceholderto mark whether external library resources need placeholder reservation; - Added
tagsto all resources for customization, and merged a series of fields; ImageTexture'sctxis now renamed tocontext;- Added
BorderKindto specify the edge display method ofCustomRect; - All fields of
ImageConfig,TextConfig, andCustomRectConfigare now wrapped withOption, and unset fields will not override the original settings of the resource; - Basic front resources added
display_infoandbasic_front_resource_configfor managing display information, position, size, and other basic information; CustomRectnow supports setting edge display methods;- Added
DisplayInfoto control whether resources are allowed to be displayed, hidden, or ignore rendering layers; - Modified
RustConstructorError, now only retaining one error type and a description of the error; - Added
RenderConfigto specify the appearance of resources when rendered by debugging tools; - Added
Eventto explain the type and state of events; - Added a series of methods and fields to adapt to the new rendering mechanism;
- Extensively improved the code.
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.