4 releases (2 breaking)

Uses new Rust 2024

0.3.1 Jun 25, 2025
0.3.0 Jun 23, 2025
0.2.0 Jun 4, 2025
0.1.0 Apr 28, 2025

#415 in Game dev

Download history 93/week @ 2025-04-23 33/week @ 2025-04-30 21/week @ 2025-05-07 14/week @ 2025-05-14 142/week @ 2025-06-04 6/week @ 2025-06-11 99/week @ 2025-06-18 189/week @ 2025-06-25

436 downloads per month

MIT license

7MB
472 lines

egor

A dead simple cross-platform 2D graphics engine

Screenshot


Why Egor?

  • Stupid Simple – You can grok the whole engine without falling into a rabbit hole
  • Cross-Platform – Same code runs native & on the web via WASM
  • Zero Boilerplate – Primitives, textures, input, text & more without writing a book
  • Extensible & Minimal – If it's not required, it’s probably not included (by default)

Features

  • Primitives
  • Textures
  • Input Handling
  • Camera System
  • Text/Fonts
  • Plugin System

Platform Support

Target Backend(s) Status
Windows DX12, Vulkan, OpenGL ✅ Stable
MacOS Metal, Vulkan (MoltenVK) ✅ Stable
Linux Vulkan, OpenGL ✅ Stable
Web (WASM) WebGPU, WebGL2 ✅ Working

[!NOTE] Mobile (Android/iOS) isn't (intended to be) supported & neither is touch input

Getting Started

Add egor to your project:

cargo add egor

Example:

App::init(MyState::default() | _, ctx | ctx.set_title("Stateful App")).run(|state, ctx| {
        let dx = ctx.input.key_held(KeyCode::ArrowRight) as i8
            - ctx.input.key_held(KeyCode::ArrowLeft) as i8;
        let dy = ctx.input.key_held(KeyCode::ArrowDown) as i8
            - ctx.input.key_held(KeyCode::ArrowUp) as i8;

        state.pos += vec2(dx as f32, dy as f32) * 100.0 * ctx.timer.delta;

        ctx.graphics.rect().color(Color::RED).at(state.pos);
    })

To see more of egor in action, checkout demos/

[!TIP] Running a demo for WASM? You’ll need to move index.html into a demo, or just use the included run.sh script (see usage). It simplifies running native, WASM & hot-reload builds

Running a Native Build

Simply run cargo:

cargo run

Running a WASM Build

Run trunk (defer to Trunk docs for setup):

trunk serve

Try Out Subsecond Hot-reloading

Add the plugin:

cargo add egor_subsecond --git https://github.com/wick3dr0se/egor --package egor_subsecond
App:init(...).plugin(HotReloadPlugin::new(MyPlugin))...

Run dioxus-cli (defer to Dioxus CLI docs for setup):

dx serve --hot-patch

[!NOTE] Subsecond hot-reloading is experimental; native is working

Contributing

egor is moving fast.. Got an idea, bugfix, or question? Check out some issues, open a new one, drop a PR, or come hang in Discord


egor is maintained with ❤️ by Open Source Force

Dependencies

~0–38MB
~615K SLoC