Likounsee/GhostEngine ? reverse-engineered prompt

Reverse engineered prompt

Build me GhostEngine, a lightweight graphics engine in Rust that renders its own 2D graphics without relying on Vulkan, OpenGL, DirectX, WebGPU, or another engine.

I want it to work on Windows, Linux, and macOS with a small platform layer that only handles opening a window and presenting the finished framebuffer. The core should handle basic drawing like lines, rectangles, circles, paths, fills, strokes, gradients, transforms, clipping, image sampling, text layout, and layer compositing. It should use a CPU renderer for now, with good performance in mind, and include a simple example app or runner that shows the rendered output and responds to input.

If it makes sense, add optional image decoding for common formats and a few deterministic tests so I can see that the rendering is stable. Keep the project clean and modular, and look up current Rust docs or any platform details online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab