RustEd is a high-performance, concurrent Doom map editor with procedural generation, inspired by the classic Eureka editor. Written entirely in Rust, RustEd leverages modern programming practices and a modular architecture to provide a safe, extensible, and responsive editing experience for game level designers.
- Overview
- Features
- Architecture & Project Structure
- Getting Started
- Usage
- Modules Overview
- Contributing
- License
- Acknowledgments
- Contact
RustEd is designed to be:
- High-performance: Leveraging Rust's zero-cost abstractions and concurrency capabilities, RustEd can handle complex level data and procedural generation without sacrificing responsiveness.
- Concurrent: Built with modern Rust libraries like Rayon for parallelism and eframe/egui for an immediate-mode GUI, RustEd supports smooth, non-blocking editing even on large maps.
- Safe and Reliable: With Rust’s strict compile-time safety guarantees, RustEd minimizes common runtime errors and memory bugs.
- Modular & Extensible: The project is organized into clear modules (e.g., BSP processing, document management, editor logic, UI, etc.), making it easy to extend and maintain.
- Procedural Generation: Generate maps using cutting-edge algorithms.
- Parallel Processing: Utilize Rayon for concurrent data processing.
- Modern UI: An immediate-mode interface built using eframe/egui, featuring:
- Top menu bar
- Side panels for tool selection
- Central canvas for map display and editing
- Bottom status bar for feedback
- Robust Level Format Support: Safely import, modify, and export level data.
- Extensible Architecture: Clearly separated modules make it easy to add new features.
The project is organized into several core directories, each responsible for a distinct aspect of RustEd’s functionality:
RustEd
├── build.rs
├── LICENSE
├── PROCEDURAL.md
├── README.md
├── resources
│ ├── common
│ ├── games
│ └── ports
├── setup_project.sh
├── src
│ ├── bsp
│ │ ├── bsp_level.rs
│ │ ├── bsp_node.rs
│ │ ├── bsp_procedural.rs
│ │ ├── bsp_util.rs
│ │ ├── debug_viz.rs
│ │ └── mod.rs
│ ├── document
│ │ ├── dehconsts.rs
│ │ ├── document.rs
│ │ └── mod.rs
│ ├── editor
│ │ ├── commands.rs
│ │ ├── core.rs
│ │ ├── cutpaste.rs
│ │ ├── generator.rs
│ │ ├── hover.rs
│ │ ├── instance.rs
│ │ ├── mod.rs
│ │ ├── objects.rs
│ │ └── tools
│ │ ├── draw.rs
│ │ ├── mod.rs
│ │ ├── sectors.rs
│ │ ├── select.rs
│ │ ├── shape.rs
│ │ └── things.rs
│ ├── lib.rs
│ ├── main.rs
│ ├── map
│ │ ├── linedef.rs
│ │ ├── mod.rs
│ │ ├── sector.rs
│ │ ├── sidedef.rs
│ │ ├── thing.rs
│ │ └── vertex.rs
│ ├── platform
│ │ ├── mod.rs
│ │ ├── win.rs
│ │ └── x11.rs
│ ├── ui
│ │ ├── central_panel.rs
│ │ ├── dialog.rs
│ │ ├── file.rs
│ │ ├── main_window.rs
│ │ ├── menu.rs
│ │ ├── mod.rs
│ │ ├── side_panel.rs
│ │ ├── status_bar.rs
│ │ ├── theme.rs
│ │ └── tool_window_manager.rs
│ └── utils
│ ├── adler.rs
│ ├── file.rs
│ ├── geometry.rs
│ ├── mod.rs
│ ├── tga.rs
│ └── util.rs
└── tests
├── bsp_tests.rs
└── mod.rs
Each module is self-contained, ensuring that you can test and develop components independently.
- Rust & Cargo: Install the latest stable Rust toolchain from rust-lang.org.
- Git: Required for cloning the repository.
- Additional Libraries: See Cargo.toml for the full list of dependencies.
-
Clone the Repository:
git clone https://github.com/EricsonWillians/RustEd.git cd RustEd
-
(Optional) Run Setup Script:
If provided, run the setup script to create the project structure:
chmod +x setup_project.sh ./setup_project.sh
Build the project using Cargo:
cargo build --release
For development (with faster compile times):
cargo build
After building, run the application with:
cargo run
This launches the RustEd editor window powered by eframe/egui. The main window displays:
- A top menu bar with options (File, Edit, View, Help).
- A left panel with tool buttons.
- A central canvas area (placeholder for map editing).
- A bottom status bar showing messages.
RustEd uses Cargo’s built-in testing framework. To run all tests:
cargo test
You can also run tests for specific modules. For example, to test the document module:
cargo test --lib document::document
Tests are organized in each module as well as in the /tests
directory for integration testing.
Handles level geometry, BSP tree generation, and blockmap processing.
Key files:
- bsp_level.rs: Functions for processing level nodes.
- bsp_node.rs: Node structure and algorithms.
- bsp_util.rs: Utility functions for BSP generation.
Manages level file formats and data structures such as vertices, linedefs, sectors, sidedefs, and things.
Key files:
- document.rs: Core document structure and methods.
- dehconsts.rs: Definitions of constants and macros for level data.
Contains core editing functionality:
- commands.rs: Editor commands and keybindings.
- generator.rs: Procedural generation algorithms.
- hover.rs: Mouse hover and selection logic.
- linedef.rs, sector.rs, vertex.rs, etc.: Object-specific editing routines.
Holds platform-specific code for Windows, Linux (X11), etc.
Key files:
- win.rs: Windows-specific initialization.
- x11.rs: Linux/X11-specific functions.
Provides the graphical user interface:
- main_window.rs: Main UI built with eframe/egui.
- Other files define dialogs, panels, and interactive widgets.
Miscellaneous helper functions (file handling, image processing, checksums, etc.).
Contributions are welcome! Please follow these guidelines:
- Fork and Clone: Create your own fork and clone it locally.
- Branching: Use feature branches for your changes.
- Tests: Write tests for new features or bug fixes.
- Pull Requests: Submit a pull request with a detailed description of your changes.
- Coding Standards: Follow Rust’s idiomatic practices and the project's coding style.
For major changes, please open an issue first to discuss your plans.
RustEd is licensed under the GNU LICENSE. See the LICENSE file for details.
- Eureka Editor: Inspired by the classic Eureka DOOM Editor.
- Rust Community: Thanks to the Rust community for the tools, libraries, and resources.
- Open-Source Contributors: Thanks to the contributors of dependencies like eframe, egui, Rayon, and others.
For questions, suggestions, or contributions, please reach out to:
- Ericson Willians – ericsonwillians@protonmail.com
- GitHub: EricsonWillians/RustEd