#windowing #opengl


Cross-platform OpenGL context provider

110 releases

new 0.27.0 Jun 22, 2021
0.26.0 Dec 10, 2020
0.25.1 Oct 9, 2020
0.24.1 May 30, 2020
0.0.1 Nov 12, 2014

#283 in Graphics APIs

Download history 9387/week @ 2021-02-26 9130/week @ 2021-03-05 8553/week @ 2021-03-12 8114/week @ 2021-03-19 8034/week @ 2021-03-26 8024/week @ 2021-04-02 9700/week @ 2021-04-09 9130/week @ 2021-04-16 8821/week @ 2021-04-23 8584/week @ 2021-04-30 9592/week @ 2021-05-07 9137/week @ 2021-05-14 8730/week @ 2021-05-21 10022/week @ 2021-05-28 8739/week @ 2021-06-04 9020/week @ 2021-06-11

38,593 downloads per month
Used in less than 134 crates



glutin - OpenGL, UTilities and INput

A low-level library for OpenGL context creation, written in pure Rust.


glutin = "0.27.0"


Contact Us

Join us in any of these:

Freenode Matrix Gitter

Usage Examples

Warning: these are examples for master. For the latest released version, 0.23, view here.

Try it!

git clone https://github.com/rust-windowing/glutin
cd glutin
cargo run --example window

Common issues

Please refer to ISSUES.md.


Glutin is an OpenGL context creation library and doesn't directly provide OpenGL bindings for you.

For examples, please look here.

Note that glutin aims at being a low-level brick in your rendering infrastructure. You are encouraged to write another layer of abstraction between glutin and your application.

Glutin is only officially supported on the latest stable version of the Rust compiler.

Platform-specific notes


To compile the examples for android, you have to use the cargo apk utility.

See the android-rs-glue repository for instructions.

Emscripten with asmjs

Emscripten support has been deprecated in favor of platforms like stdweb. To get an OpenGL context on these platforms, please use crates like glow instead.


The plan is that glutin tries to dynamically link-to and use Wayland w/EGL if possible. If it doesn't work, it will try Xlib w/GLX follow by Xlib w/EGL instead. This is work-in-progress.


Due to an issue with how Mesa and Wayland play together, all shared contexts must use the same events pool as each other.


~69K SLoC