xege-ffi

Crates.ioxege-ffi
lib.rsxege-ffi
version0.1.6
created_at2025-08-03 05:15:15.275449+00
updated_at2025-08-12 12:07:03.012645+00
descriptionFFI bindings for xege library.
homepagehttps://xege.org/
repositoryhttps://github.com/Anglebase/xege-ffi.git
max_upload_size
id1779367
size10,768,911
(Anglebase)

documentation

README

xege-ffi

This crate provides Rust FFI bindings for the C++ graphics library xege. It enables users to call xege's functionalities within Rust. xege is a beginner-oriented C++ graphics library offering features like graphics drawing, event handling, and other functionalities. It is a widely used third-party library for programming language and computer graphics learning.

Why EGE?

EGE (Easy Graphics Engine) is a simple graphics library for Windows. It is similar to BGI (graphics.h) and is designed for beginners in C/C++ programming (Now, it can also be used in Rust). Its goal is to serve as a replacement for the BGI library from Turbo C (TC).

Its usage is very close to graphics.h from TC. For beginners, it is simple, friendly, and easy to learn. It is free, open-source, and features an intuitive interface. Even those with no prior graphics programming experience can quickly master basic drawing.

Example

use std::io::stdin;

fn main() {
    unsafe {
        xege_ffi::ege_initgraph(640, 480, 0);
        stdin().lines().next().unwrap().unwrap();
        xege_ffi::ege_closegraph();
    }
}

License

This project is licensed under the MIT license.

Commit count: 0

cargo fmt