Welcome to Oil !

Oil is a GUI library for Game developers. It is written in Rust. To learn more about Rust, please visit the official web site.

Oil abstracts the user interface related code from your core game application. In that respect, it works similarly to QML. So how it is different ?

Instead of using a scripting language, Oil provides you:

With that in mind, we hope Oil will help you have a clear separation between your game logic, and the user interface.

Note:

If you think that some of the above statements are currently wrong, you're probably right. What are you waiting for to contribute to the project then ? :)

Getting started

To use oil in your code, you must add it to your Cargo.toml file in the dependency section:

[dependencies]
oil = "*"

Oil currently relies on glium and glutin to do the rendering.

While this will be more flexible in the future, both these library are pretty good to start with and have a decent wrapper around OpenGL.

The only thing needed to know about glutin/glium to use the Oil is how to create a window, which as simple as doing writing such as:

extern crate glutin;
extern crate glium;

use glium::DisplayBuild;

// ...

let display = glutin::WindowBuilder::new()
    .build_glium()
    .unwrap();

Writing your first interface

TODO