Repository: brendanzab/gl-rs (language: rust)

Issue:
Outdated Readmes
Currently readmes state to use versions 0.5 and 0.6. Crate readmes are also missing up-to-date changelog.
Update webidl requirement from 0.8 to 0.9
Updates the requirements on [webidl](https://github.com/sgodwincs/webidl-rs) to permit the latest version.
<details>
<summary>Changelog</summary>

*Sourced from [webidl's changelog](https://github.com/sgodwincs/webidl-rs/blob/master/RELEASES.md).*

> # 0.9.0
> 
> - Update `lalrpop` to `0.17.0`
> - Fix some new clippy warnings by removing useless `Box`ing
> 
> # 0.8.0
> 
>  - Update `lalrpop` to `0.16.0` to reduce package size.
> 
> # 0.7.0
> 
>  - Fixed bug where integer literals outside the range of `i64` could not be represented ([#15](https://github-redirect.dependabot.com/sgodwincs/webidl-rs/pull/15) 
> 
> # 0.6.0
> 
>  - Fixed bug where the generated parser would still be in the source directory ([#13](https://github-redirect.dependabot.com/sgodwincs/webidl-rs/pull/13))
>  - Add back support for parsing `implements` statement for backwards compatibility with older WebIDLs
>  - Add back support for parsing `legacycaller` in special operations for backwards compatibility with older WebIDLs
>  - Update `lalrpop` to `0.15.1`. Version `0.15.0` cannot be used as it breaks with usage of `include!`
>  - Remove unnecessary `Parser` struct, since it does not do anything. Instead of doing
> 
>  ```
>  let parser = Parser::new();
>  let result = parser.parse_string(...);
>  ```
> 
>  You can now simply do
> 
>  ```
>  let result = parse_string(...);
>  ```
> 
> # 0.5.0
> 
>  - Reduced package size by excluding `mozilla_webidls.zip` and upgrading `lalrpop` to `0.14.0` ([#12](https://github-redirect.dependabot.com/sgodwincs/webidl-rs/pull/12))
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/sgodwincs/webidl-rs/commits)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
Dependabot will **not** automatically merge this PR because this dependency is pre-1.0.0.

[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index ad7c75f2..968b7c69 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ An OpenGL function pointer loader for the Rust Programming Language.
 
 ```toml
 [dependencies]
-gl = "0.6.0"
+gl = "0.14.0"
 ```
 
 ### gl_generator
@@ -33,7 +33,7 @@ Code generators for creating bindings to the Khronos OpenGL APIs.
 
 ```toml
 [build-dependencies]
-gl_generator = "0.5.0"
+gl_generator = "0.14.0"
 ```
 
 ### khronos_api
@@ -46,13 +46,39 @@ The Khronos XML API Registry, exposed as byte string constants.
 
 ```toml
 [build-dependencies]
-khronos_api = "1.0.0"
+khronos_api = "3.1.0"
 ```
 
-## Compiling from source
+#### Compiling from source
 
 `khronos_api` makes use of git submodules. You will need to initialize these before building:
 
 ```sh
 git submodule update --init
 ```
+
+### webgl_generator
+
+[![Version](https://img.shields.io/crates/v/webgl_generator.svg)](https://crates.io/crates/webgl_generator) [![License](https://img.shields.io/crates/l/webgl_generator.svg)](https://github.com/brendanzab/gl-rs/blob/master/LICENSE) [![Downloads](https://img.shields.io/crates/d/webgl_generator.svg)](https://crates.io/crates/webgl_generator)
+
+[README](https://github.com/brendanzab/gl-rs/tree/master/webgl_generator)
+
+Code generators for creating bindings to the WebGL APIs.
+
+```toml
+[build-dependencies]
+webgl_generator = "0.2.0"
+```
+
+### webgl-stdweb
+
+[![Version](https://img.shields.io/crates/v/webgl_stdweb.svg)](https://crates.io/crates/webgl_stdweb) [![License](https://img.shields.io/crates/l/webgl_stdweb.svg)](https://github.com/brendanzab/gl-rs/blob/master/LICENSE) [![Downloads](https://img.shields.io/crates/d/webgl_stdweb.svg)](https://crates.io/crates/webgl_stdweb)
+
+[README](https://github.com/brendanzab/gl-rs/tree/master/webgl_stdweb)
+
+WebGL bindings using stdweb
+
+```toml
+[build-dependencies]
+webgl_stdweb = "0.3.0"
+```
diff --git a/gl/Cargo.toml b/gl/Cargo.toml
index bcd66142..872089f5 100644
--- a/gl/Cargo.toml
+++ b/gl/Cargo.toml
@@ -20,4 +20,4 @@ keywords = ["gl", "egl", "opengl", "khronos"]
 gl_generator = { version = "0.14.0", path = "../gl_generator" }
 
 [dev-dependencies]
-glutin = "0.21.0"
+glutin = "0.23"
diff --git a/gl/README.md b/gl/README.md
index 34345a53..8e72e504 100644
--- a/gl/README.md
+++ b/gl/README.md
@@ -8,7 +8,7 @@ An OpenGL function pointer loader for the Rust Programming Language.
 
 ```toml
 [dependencies]
-gl = "0.6.0"
+gl = "0.14.0"
 ```
 
 ## Basic usage
@@ -23,8 +23,7 @@ use gl::types::*;
 
 You must load the function pointers into their respective function pointers
 using the `load_with` function. You must supply a loader function from your
-context library, This is how it would look using [glfw-rs]
-(https://github.com/PistonDevelopers/glfw-rs):
+context library. This is how it would look using [glfw-rs](https://github.com/PistonDevelopers/glfw-rs):
 
 ```rust
 // the supplied function must be of the type:
@@ -41,15 +40,14 @@ Calling a function that has not been loaded will result in a failure like:
 does not cause any run time overhead because the failing functions are
 assigned only when `load_with` is called.
 
+All OpenGL function calls are `unsafe`.
+
 ```rust
 // accessing an enum
-gl::RED_BITS;
+gl::TEXTURE_2D;
 
 // calling a function
-gl::DrawArrays(gl::TRIANGLES, 0, 3);
-
-// functions that take pointers are unsafe
-unsafe {  gl::ShaderSource(shader, 1, &c_str, std::ptr::null()) };
+unsafe { gl::DrawArrays(gl::TRIANGLES, 0, 3) };
 ```
 
 Each function pointer has an associated boolean value allowing you to
@@ -62,22 +60,3 @@ if gl::Viewport::is_loaded() {
     // do something...
 }
 ```
-
-## Changelog
-
-### v0.6.0
-
-- Upgrade to `gl_generator` v0.5.0
-
-### v0.5.2
-
-- Update crate metadata
-
-### v0.5.1
-
-- Upgrade `khronos_api` to v1.0.0
-
-### v0.5.0
-
-- Use `glutin` for examples
-- Use `raw::c_void` for `GLvoid`
diff --git a/gl/build.rs b/gl/build.rs
index 0d18a8a3..f3502cda 100644
--- a/gl/build.rs
+++ b/gl/build.rs
@@ -20,10 +20,10 @@ use std::fs::File;
 use std::path::Path;
 
 fn main() {
-    let out_dir = env::var("OUT_DIR").unwrap();
-    let mut file = File::create(&Path::new(&out_dir).join("bindings.rs")).unwrap();
+    let dest = env::var("OUT_DIR").unwrap();
+    let mut file = File::create(&Path::new(&dest).join("bindings.rs")).unwrap();
 
-    Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
+    Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, [])
         .write_bindings(GlobalGenerator, &mut file)
         .unwrap();
 }
diff --git a/gl/examples/basic.rs b/gl/examples/basic.rs
index f3bd74b1..5a50dcef 100644
--- a/gl/examples/basic.rs
+++ b/gl/examples/basic.rs
@@ -16,35 +16,36 @@ extern crate gl;
 extern crate glutin;
 
 fn main() {
-    let mut events_loop = glutin::EventsLoop::new();
-    let window = glutin::WindowBuilder::new();
+    let event_loop = glutin::event_loop::EventLoop::new();
+    let window = glutin::window::WindowBuilder::new();
     let gl_window = glutin::ContextBuilder::new()
-        .build_windowed(window, &events_loop)
+        .build_windowed(window, &event_loop)
         .unwrap();
 
     // It is essential to make the context current before calling `gl::load_with`.
     let gl_window = unsafe { gl_window.make_current().unwrap() };
 
     // Load the OpenGL function pointers
-    // TODO: `as *const _` will not be needed once glutin is updated to the latest gl version
-    gl::load_with(|symbol| gl_window.get_proc_address(symbol) as *const _);
-
-    events_loop.run_forever(|event| {
-        use glutin::{ControlFlow, Event, WindowEvent};
-
-        if let Event::WindowEvent { event, .. } = event {
-            if let WindowEvent::CloseRequested = event {
-                return ControlFlow::Break;
-            }
-        }
-
-        unsafe {
-            gl::ClearColor(0.3, 0.3, 0.3, 1.0);
-            gl::Clear(gl::COLOR_BUFFER_BIT);
+    gl::load_with(|symbol| gl_window.get_proc_address(symbol));
+
+    event_loop.run(move |event, _, control_flow| {
+        use glutin::event::{Event, WindowEvent};
+        use glutin::event_loop::ControlFlow;
+        *control_flow = ControlFlow::Wait;
+        match event {
+            Event::LoopDestroyed => return,
+            Event::WindowEvent { event, .. } => match event {
+                WindowEvent::CloseRequested => *control_flow = ControlFlow::Exit,
+                _ => (),
+            },
+            Event::RedrawRequested(_) => {
+                unsafe {
+                    gl::ClearColor(0.3, 0.3, 0.3, 1.0);
+                    gl::Clear(gl::COLOR_BUFFER_BIT);
+                }
+                gl_window.swap_buffers().unwrap();
+            },
+            _ => (),
         }
-
-        gl_window.swap_buffers().unwrap();
-
-        ControlFlow::Continue
     });
 }
diff --git a/gl/examples/triangle.rs b/gl/examples/triangle.rs
index 5ea57a1f..a109c17a 100644
--- a/gl/examples/triangle.rs
+++ b/gl/examples/triangle.rs
@@ -111,18 +111,17 @@ fn link_program(vs: GLuint, fs: GLuint) -> GLuint {
 }
 
 fn main() {
-    let mut events_loop = glutin::EventsLoop::new();
-    let window = glutin::WindowBuilder::new();
+    let event_loop = glutin::event_loop::EventLoop::new();
+    let window = glutin::window::WindowBuilder::new();
     let gl_window = glutin::ContextBuilder::new()
-        .build_windowed(window, &events_loop)
+        .build_windowed(window, &event_loop)
         .unwrap();
 
     // It is essential to make the context current before calling `gl::load_with`.
     let gl_window = unsafe { gl_window.make_current() }.unwrap();
 
     // Load the OpenGL function pointers
-    // TODO: `as *const _` will not be needed once glutin is updated to the latest gl version
-    gl::load_with(|symbol| gl_window.get_proc_address(symbol) as *const _);
+    gl::load_with(|symbol| gl_window.get_proc_address(symbol));
 
     // Create GLSL shaders
     let vs = compile_shader(VS_SRC, gl::VERTEX_SHADER);
@@ -164,35 +163,37 @@ fn main() {
         );
     }
 
-    events_loop.run_forever(|event| {
-        use glutin::{ControlFlow, Event, WindowEvent};
-
-        if let Event::WindowEvent { event, .. } = event {
-            if let WindowEvent::CloseRequested = event {
-                return ControlFlow::Break;
-            }
+    event_loop.run(move |event, _, control_flow| {
+        use glutin::event::{Event, WindowEvent};
+        use glutin::event_loop::ControlFlow;
+        *control_flow = ControlFlow::Wait;
+        match event {
+            Event::LoopDestroyed => return,
+            Event::WindowEvent { event, .. } => match event {
+                WindowEvent::CloseRequested => {
+                    // Cleanup
+                    unsafe {
+                        gl::DeleteProgram(program);
+                        gl::DeleteShader(fs);
+                        gl::DeleteShader(vs);
+                        gl::DeleteBuffers(1, &vbo);
+                        gl::DeleteVertexArrays(1, &vao);
+                    }
+                    *control_flow = ControlFlow::Exit
+                },
+                _ => (),
+            },
+            Event::RedrawRequested(_) => {
+                unsafe {
+                    // Clear the screen to black
+                    gl::ClearColor(0.3, 0.3, 0.3, 1.0);
+                    gl::Clear(gl::COLOR_BUFFER_BIT);
+                    // Draw a triangle from the 3 vertices
+                    gl::DrawArrays(gl::TRIANGLES, 0, 3);
+                }
+                gl_window.swap_buffers().unwrap();
+            },
+            _ => (),
         }
-
-        unsafe {
-            // Clear the screen to black
-            gl::ClearColor(0.3, 0.3, 0.3, 1.0);
-            gl::Clear(gl::COLOR_BUFFER_BIT);
-
-            // Draw a triangle from the 3 vertices
-            gl::DrawArrays(gl::TRIANGLES, 0, 3);
-        }
-
-        gl_window.swap_buffers().unwrap();
-
-        ControlFlow::Continue
     });
-
-    // Cleanup
-    unsafe {
-        gl::DeleteProgram(program);
-        gl::DeleteShader(fs);
-        gl::DeleteShader(vs);
-        gl::DeleteBuffers(1, &vbo);
-        gl::DeleteVertexArrays(1, &vao);
-    }
 }
diff --git a/gl/src/lib.rs b/gl/src/lib.rs
index 5745ede4..4e2c8bd6 100644
--- a/gl/src/lib.rs
+++ b/gl/src/lib.rs
@@ -25,25 +25,27 @@
 //! # }
 //! ~~~
 //!
-//! You can load the function pointers into their respective function pointers
+//! You must load the function pointers into their respective function pointers
 //! using the `load_with` function. You must supply a loader function from your
-//! context library, This is how it would look using [glfw-rs]
-//! (https://github.com/PistonDevelopers/glfw-rs):
+//! context library. This is how it would look using [glfw-rs](https://github.com/PistonDevelopers/glfw-rs):
 //!
 //! ~~~ignore
 //! // the supplied function must be of the type:
 //! // `&fn(symbol: &'static str) -> *const std::os::raw::c_void`
-//! gl::load_with(|s| glfw.get_proc_address(s));
+//! // `window` is a glfw::Window
+//! gl::load_with(|s| window.get_proc_address(s) as *const _);
 //!
 //! // loading a specific function pointer
-//! gl::Viewport::load_with(|s| glfw.get_proc_address(s));
+//! gl::Viewport::load_with(|s| window.get_proc_address(s) as *const _);
 //! ~~~
 //!
 //! Calling a function that has not been loaded will result in a failure like:
-//! `panic!("gl::Viewport was not loaded")`, which aviods a segfault. This feature
+//! `panic!("gl::Viewport was not loaded")`, which avoids a segfault. This feature
 //! does not cause any run time overhead because the failing functions are
 //! assigned only when `load_with` is called.
 //!
+//! All OpenGL function calls are `unsafe`.
+//!
 //! ~~~no_run
 //! # #![allow(path_statement)]
 //! # extern crate gl;
@@ -53,11 +55,6 @@
 //!
 //! // calling a function
 //! unsafe { gl::DrawArrays(gl::TRIANGLES, 0, 3) };
-//!
-//! // functions that take pointers are unsafe
-//! # let shader = 0;
-//! # let c_str: *const i8 = std::ptr::null();
-//! unsafe { gl::ShaderSource(shader, 1, &c_str, std::ptr::null()) };
 //! # }
 //! ~~~
 //!
diff --git a/gl_generator/README.md b/gl_generator/README.md
index 36d3e707..41146f21 100644
--- a/gl_generator/README.md
+++ b/gl_generator/README.md
@@ -10,16 +10,16 @@ Code generators for creating bindings to the Khronos OpenGL APIs.
 
 If you need a specific version of OpenGL, or you need a different API
 (OpenGL ES, EGL, WGL, GLX), or if you need certain extensions, you should use
-the `gl_generator` plugin instead.
+the `gl_generator` crate.
 
 See [gfx_gl](https://github.com/gfx-rs/gfx_gl) for an example of using a
-custom gfx-rs loader for a project.
+custom OpenGL loader for a project.
 
 Add this to your `Cargo.toml`:
 
 ```toml
 [build-dependencies]
-gl_generator = "0.5.0"
+gl_generator = "0.14.0"
 ```
 
 Under the `[package]` section, add:
@@ -33,7 +33,7 @@ Create a `build.rs` to pull your specific version/API:
 ```rust
 extern crate gl_generator;
 
-use gl_generator::{Registry, Api, Profile, Fallbacks, GlobalGenerator};
+use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
 use std::env;
 use std::fs::File;
 use std::path::Path;
@@ -42,7 +42,7 @@ fn main() {
     let dest = env::var("OUT_DIR").unwrap();
     let mut file = File::create(&Path::new(&dest).join("bindings.rs")).unwrap();
 
-    Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
+    Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, [])
         .write_bindings(GlobalGenerator, &mut file)
         .unwrap();
 }
@@ -59,7 +59,7 @@ mod gl {
 fn main() {
     let window = ...;
 
-    // Assuming `window` is GLFW: initialize, and make current
+    // Assuming `window` is a glfw::Window, made current
     gl::load_with(|s| window.get_proc_address(s) as *const _);
 }
 ```
@@ -71,8 +71,8 @@ The `build.rs` file will generate all the OpenGL functions in a file named,
 
 ### Global generator
 
-The global generator is the one used by default by the `gl` crate. See above
-for more details.
+The global generator is the one used by default by the `gl` crate. See the 
+[README](https://github.com/brendanzab/gl-rs/tree/master/gl) for more details.
 
 ### Struct generator
 
@@ -117,7 +117,7 @@ your `Cargo.toml`:
 
 ```toml
 [build-dependencies.gl_generator]
-version = "0.4.2"
+version = "0.14.0"
 features = ["unstable_generator_utils"]
 ```
 
@@ -126,40 +126,3 @@ features = ["unstable_generator_utils"]
 The global and struct generators will attempt to use fallbacks functions when
 they are available. For example, if `glGenFramebuffers` cannot be loaded it will
 also attempt to load `glGenFramebuffersEXT` as a fallback.
-
-## Changelog
-
-### v0.5.0
-
-- Rename `Ns` to `API`, and expose at the top level
-- Remove the need for clients to depend on the `khronos_api` crate by
-  determining the XML source based on the requested `API`
-- Use a `(u8, u8)` instead of a string for the target version number
-- Use a `Profile` enum instead of a string for the profile
-- Remove unused fields from `Registry`
-- Accept types satisfying `AsRef<[&str]>` for extension lists
-- Separate parsing and generation stages in API
-- Hide `registry::{Feature, Filter, Require, Remove, Extension}` types from the
-  public API
-- Move `registry::{Fallbacks, Api, Profile}` types to top level module
-- Remove `GlxOpcode::type` field
-- Make `ty` fields on `Enum` and `Binding` take `Cow<'static, str>`s to reduce
-  allocations
-
-### v0.4.2
-
-- Update crate metadata
-
-### v0.4.1
-
-- Upgrade `khronos_api` to v1.0.0
-
-### v0.4.0
-
-- Upgrade `xml-rs` to v0.2.2
-- Use `raw::c_void` for `GLvoid`
-- Remove `registry::{Group, EnumNs, CmdNs}`
-- Remove `groups` field from `registry::Registry`
-- Remove `is_safe` field from `registry::Cmd`
-- Remove `comment` field from `registry::{Require, Remove, GlxOpcode}`
-- Downgrade `khronos_api` to be a dev-dependency
diff --git a/gl_generator/generators/debug_struct_gen.rs b/gl_generator/generators/debug_struct_gen.rs
index 98fbcef1..87e57065 100644
--- a/gl_generator/generators/debug_struct_gen.rs
+++ b/gl_generator/generators/debug_struct_gen.rs
@@ -23,13 +23,13 @@ impl super::Generator for DebugStructGenerator {
     where
         W: io::Write,
     {
-        try!(write_header(dest));
-        try!(write_type_aliases(registry, dest));
-        try!(write_enums(registry, dest));
-        try!(write_fnptr_struct_def(dest));
-        try!(write_panicking_fns(registry, dest));
-        try!(write_struct(registry, dest));
-        try!(write_impl(registry, dest));
+        write_header(dest)?;
+        write_type_aliases(registry, dest)?;
+        write_enums(registry, dest)?;
+        write_fnptr_struct_def(dest)?;
+        write_panicking_fns(registry, dest)?;
+        write_struct(registry, dest)?;
+        write_impl(registry, dest)?;
         Ok(())
     }
 }
@@ -59,15 +59,15 @@ fn write_type_aliases<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         r#"
         pub mod types {{
             #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
     "#
-    ));
+    )?;
 
-    try!(super::gen_types(registry.api, dest));
+    super::gen_types(registry.api, dest)?;
 
     writeln!(dest, "}}")
 }
@@ -78,7 +78,7 @@ where
     W: io::Write,
 {
     for enm in &registry.enums {
-        try!(super::gen_enum_item(enm, "types::", dest));
+        super::gen_enum_item(enm, "types::", dest)?;
     }
 
     Ok(())
@@ -151,22 +151,22 @@ fn write_struct<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         "
         #[allow(non_camel_case_types, non_snake_case, dead_code)]
         #[derive(Clone)]
         pub struct {api} {{",
         api = super::gen_struct_name(registry.api)
-    ));
+    )?;
 
     for cmd in &registry.cmds {
         if let Some(v) = registry.aliases.get(&cmd.proto.ident) {
-            try!(writeln!(dest, "/// Fallbacks: {}", v.join(", ")));
+            writeln!(dest, "/// Fallbacks: {}", v.join(", "))?;
         }
-        try!(writeln!(dest, "pub {name}: FnPtr,", name = cmd.proto.ident));
+        writeln!(dest, "pub {name}: FnPtr,", name = cmd.proto.ident)?;
     }
-    try!(writeln!(dest, "_priv: ()"));
+    writeln!(dest, "_priv: ()")?;
 
     writeln!(dest, "}}")
 }
@@ -176,7 +176,7 @@ fn write_impl<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(dest,
+    writeln!(dest,
                   "impl {api} {{
             /// Load each OpenGL symbol using a custom load function. This allows for the
             /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
@@ -204,10 +204,10 @@ where
                     do_metaloadfn(&mut loadfn, symbol, symbols)
                 }};
                 {api} {{",
-                  api = super::gen_struct_name(registry.api)));
+                  api = super::gen_struct_name(registry.api))?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "{name}: FnPtr::new(metaloadfn(\"{symbol}\", &[{fallbacks}])),",
             name = cmd.proto.ident,
@@ -220,15 +220,15 @@ where
                     .join(", "),
                 None => format!(""),
             },
-        ))
+        )?
     }
-    try!(writeln!(dest, "_priv: ()"));
+    writeln!(dest, "_priv: ()")?;
 
-    try!(writeln!(
+    writeln!(
         dest,
         "}}
         }}"
-    ));
+    )?;
 
     for cmd in &registry.cmds {
         let idents = super::gen_parameters(cmd, true, false);
@@ -247,11 +247,12 @@ where
                     format!(", \"<callback>\"")
                 } else {
                     format!(", {}", name)
-                }).collect::<Vec<_>>()
+                })
+                .collect::<Vec<_>>()
                 .concat()
         );
 
-        try!(writeln!(dest,
+        writeln!(dest,
                       "#[allow(non_snake_case, unused_variables, dead_code)]
             #[inline] pub unsafe fn {name}(&self, {params}) -> {return_suffix} {{ \
                 {println}
@@ -276,7 +277,7 @@ where
                     (self.GetError.f)() {{ 0 => (), r => println!("[OpenGL] ^ GL error triggered: {{}}", r) }}"#)
                       } else {
                           format!("")
-                      }))
+                      })?
     }
 
     writeln!(
diff --git a/gl_generator/generators/global_gen.rs b/gl_generator/generators/global_gen.rs
index 82c47109..2ed8a059 100644
--- a/gl_generator/generators/global_gen.rs
+++ b/gl_generator/generators/global_gen.rs
@@ -23,16 +23,16 @@ impl super::Generator for GlobalGenerator {
     where
         W: io::Write,
     {
-        try!(write_header(dest));
-        try!(write_metaloadfn(dest));
-        try!(write_type_aliases(registry, dest));
-        try!(write_enums(registry, dest));
-        try!(write_fns(registry, dest));
-        try!(write_fnptr_struct_def(dest));
-        try!(write_ptrs(registry, dest));
-        try!(write_fn_mods(registry, dest));
-        try!(write_panicking_fns(registry, dest));
-        try!(write_load_fn(registry, dest));
+        write_header(dest)?;
+        write_metaloadfn(dest)?;
+        write_type_aliases(registry, dest)?;
+        write_enums(registry, dest)?;
+        write_fns(registry, dest)?;
+        write_fnptr_struct_def(dest)?;
+        write_ptrs(registry, dest)?;
+        write_fn_mods(registry, dest)?;
+        write_panicking_fns(registry, dest)?;
+        write_load_fn(registry, dest)?;
         Ok(())
     }
 }
@@ -86,15 +86,15 @@ fn write_type_aliases<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         r#"
         pub mod types {{
             #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
     "#
-    ));
+    )?;
 
-    try!(super::gen_types(registry.api, dest));
+    super::gen_types(registry.api, dest)?;
 
     writeln!(
         dest,
@@ -110,7 +110,7 @@ where
     W: io::Write,
 {
     for enm in &registry.enums {
-        try!(super::gen_enum_item(enm, "types::", dest));
+        super::gen_enum_item(enm, "types::", dest)?;
     }
 
     Ok(())
@@ -126,10 +126,10 @@ where
 {
     for cmd in &registry.cmds {
         if let Some(v) = registry.aliases.get(&cmd.proto.ident) {
-            try!(writeln!(dest, "/// Fallbacks: {}", v.join(", ")));
+            writeln!(dest, "/// Fallbacks: {}", v.join(", "))?;
         }
 
-        try!(writeln!(dest,
+        writeln!(dest,
             "#[allow(non_snake_case, unused_variables, dead_code)] #[inline]
             pub unsafe fn {name}({params}) -> {return_suffix} {{ \
                 __gl_imports::mem::transmute::<_, extern \"system\" fn({typed_params}) -> {return_suffix}>\
@@ -140,7 +140,7 @@ where
             typed_params = super::gen_parameters(cmd, false, true).join(", "),
             return_suffix = cmd.proto.ty,
             idents = super::gen_parameters(cmd, true, false).join(", "),
-        ));
+        )?;
     }
 
     Ok(())
@@ -179,24 +179,24 @@ fn write_ptrs<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         "mod storage {{
             #![allow(non_snake_case)]
             #![allow(non_upper_case_globals)]
             use super::__gl_imports::raw;
             use super::FnPtr;"
-    ));
+    )?;
 
     for c in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "pub static mut {name}: FnPtr = FnPtr {{
                 f: super::missing_fn_panic as *const raw::c_void,
                 is_loaded: false
             }};",
             name = c.proto.ident
-        ));
+        )?;
     }
 
     writeln!(dest, "}}")
@@ -225,7 +225,9 @@ where
         let symbol = super::gen_symbol_name(registry.api, &c.proto.ident[..]);
         let symbol = &symbol[..];
 
-        try!(writeln!(dest, r##"
+        writeln!(
+            dest,
+            r##"
             #[allow(non_snake_case)]
             pub mod {fnname} {{
                 use super::{{storage, metaloadfn}};
@@ -245,7 +247,11 @@ where
                     }}
                 }}
             }}
-        "##, fnname = fnname, fallbacks = fallbacks, symbol = symbol));
+        "##,
+            fnname = fnname,
+            fallbacks = fallbacks,
+            symbol = symbol
+        )?;
     }
 
     Ok(())
@@ -276,7 +282,7 @@ fn write_load_fn<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(dest,
+    writeln!(dest,
                   "
         /// Load each OpenGL symbol using a custom load function. This allows for the
         /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
@@ -287,14 +293,14 @@ where
         pub fn load_with<F>(mut loadfn: F) where F: FnMut(&'static str) -> *const __gl_imports::raw::c_void {{
             #[inline(never)]
             fn inner(loadfn: &mut dyn FnMut(&'static str) -> *const __gl_imports::raw::c_void) {{
-    "));
+    ")?;
 
     for c in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "{cmd_name}::load_with(&mut *loadfn);",
             cmd_name = &c.proto.ident[..]
-        ));
+        )?;
     }
 
     writeln!(
diff --git a/gl_generator/generators/mod.rs b/gl_generator/generators/mod.rs
index 659d2eca..f04c5b05 100644
--- a/gl_generator/generators/mod.rs
+++ b/gl_generator/generators/mod.rs
@@ -72,15 +72,15 @@ where
     W: io::Write,
 {
     if let Api::Egl = api {
-        try!(writeln!(dest, "{}", include_str!("templates/types/egl.rs")));
+        writeln!(dest, "{}", include_str!("templates/types/egl.rs"))?;
         return Ok(());
     }
 
-    try!(writeln!(dest, "{}", include_str!("templates/types/gl.rs")));
+    writeln!(dest, "{}", include_str!("templates/types/gl.rs"))?;
 
     match api {
-        Api::Glx => try!(writeln!(dest, "{}", include_str!("templates/types/glx.rs"))),
-        Api::Wgl => try!(writeln!(dest, "{}", include_str!("templates/types/wgl.rs"))),
+        Api::Glx => writeln!(dest, "{}", include_str!("templates/types/glx.rs"))?,
+        Api::Wgl => writeln!(dest, "{}", include_str!("templates/types/wgl.rs"))?,
         _ => {},
     }
 
diff --git a/gl_generator/generators/static_gen.rs b/gl_generator/generators/static_gen.rs
index 8d15de01..a1d2a91a 100644
--- a/gl_generator/generators/static_gen.rs
+++ b/gl_generator/generators/static_gen.rs
@@ -23,10 +23,10 @@ impl super::Generator for StaticGenerator {
     where
         W: io::Write,
     {
-        try!(write_header(dest));
-        try!(write_type_aliases(registry, dest));
-        try!(write_enums(registry, dest));
-        try!(write_fns(registry, dest));
+        write_header(dest)?;
+        write_type_aliases(registry, dest)?;
+        write_enums(registry, dest)?;
+        write_fns(registry, dest)?;
         Ok(())
     }
 }
@@ -55,15 +55,15 @@ fn write_type_aliases<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         r#"
         pub mod types {{
             #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
     "#
-    ));
+    )?;
 
-    try!(super::gen_types(registry.api, dest));
+    super::gen_types(registry.api, dest)?;
 
     writeln!(
         dest,
@@ -79,7 +79,7 @@ where
     W: io::Write,
 {
     for enm in &registry.enums {
-        try!(super::gen_enum_item(enm, "types::", dest));
+        super::gen_enum_item(enm, "types::", dest)?;
     }
 
     Ok(())
@@ -92,15 +92,15 @@ fn write_fns<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         "
         #[allow(non_snake_case, unused_variables, dead_code)]
         extern \"system\" {{"
-    ));
+    )?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "#[link_name=\"{symbol}\"]
             pub fn {name}({params}) -> {return_suffix};",
@@ -108,7 +108,7 @@ where
             name = cmd.proto.ident,
             params = super::gen_parameters(cmd, true, true).join(", "),
             return_suffix = cmd.proto.ty,
-        ));
+        )?;
     }
 
     writeln!(dest, "}}")
diff --git a/gl_generator/generators/static_struct_gen.rs b/gl_generator/generators/static_struct_gen.rs
index c03a3e09..0e385cb5 100644
--- a/gl_generator/generators/static_struct_gen.rs
+++ b/gl_generator/generators/static_struct_gen.rs
@@ -23,12 +23,12 @@ impl super::Generator for StaticStructGenerator {
     where
         W: io::Write,
     {
-        try!(write_header(dest));
-        try!(write_type_aliases(registry, dest));
-        try!(write_enums(registry, dest));
-        try!(write_struct(registry, dest));
-        try!(write_impl(registry, dest));
-        try!(write_fns(registry, dest));
+        write_header(dest)?;
+        write_type_aliases(registry, dest)?;
+        write_enums(registry, dest)?;
+        write_struct(registry, dest)?;
+        write_impl(registry, dest)?;
+        write_fns(registry, dest)?;
         Ok(())
     }
 }
@@ -57,15 +57,15 @@ fn write_type_aliases<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         r#"
         pub mod types {{
             #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
     "#
-    ));
+    )?;
 
-    try!(super::gen_types(registry.api, dest));
+    super::gen_types(registry.api, dest)?;
 
     writeln!(dest, "}}")
 }
@@ -76,7 +76,7 @@ where
     W: io::Write,
 {
     for enm in &registry.enums {
-        try!(super::gen_enum_item(enm, "types::", dest));
+        super::gen_enum_item(enm, "types::", dest)?;
     }
 
     Ok(())
@@ -104,7 +104,7 @@ fn write_impl<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(dest,
+    writeln!(dest,
         "impl {api} {{
             /// Stub function.
             #[allow(dead_code)]
@@ -112,10 +112,10 @@ where
                 {api}
             }}",
         api = super::gen_struct_name(registry.api),
-    ));
+    )?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "#[allow(non_snake_case)]
             // #[allow(unused_variables)]
@@ -128,7 +128,7 @@ where
             typed_params = super::gen_parameters(cmd, true, true).join(", "),
             return_suffix = cmd.proto.ty,
             idents = super::gen_parameters(cmd, true, false).join(", "),
-        ));
+        )?;
     }
 
     writeln!(dest, "}}")
@@ -141,24 +141,24 @@ fn write_fns<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         "
         #[allow(non_snake_case)]
         #[allow(unused_variables)]
         #[allow(dead_code)]
         extern \"system\" {{"
-    ));
+    )?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "#[link_name=\"{symbol}\"] fn {name}({params}) -> {return_suffix};",
             symbol = super::gen_symbol_name(registry.api, &cmd.proto.ident),
             name = cmd.proto.ident,
             params = super::gen_parameters(cmd, true, true).join(", "),
             return_suffix = cmd.proto.ty,
-        ));
+        )?;
     }
 
     writeln!(dest, "}}")
diff --git a/gl_generator/generators/struct_gen.rs b/gl_generator/generators/struct_gen.rs
index 6fcc3af0..55dbd32c 100644
--- a/gl_generator/generators/struct_gen.rs
+++ b/gl_generator/generators/struct_gen.rs
@@ -23,13 +23,13 @@ impl super::Generator for StructGenerator {
     where
         W: io::Write,
     {
-        try!(write_header(dest));
-        try!(write_type_aliases(registry, dest));
-        try!(write_enums(registry, dest));
-        try!(write_fnptr_struct_def(dest));
-        try!(write_panicking_fns(registry, dest));
-        try!(write_struct(registry, dest));
-        try!(write_impl(registry, dest));
+        write_header(dest)?;
+        write_type_aliases(registry, dest)?;
+        write_enums(registry, dest)?;
+        write_fnptr_struct_def(dest)?;
+        write_panicking_fns(registry, dest)?;
+        write_struct(registry, dest)?;
+        write_impl(registry, dest)?;
         Ok(())
     }
 }
@@ -59,15 +59,15 @@ fn write_type_aliases<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         r#"
         pub mod types {{
             #![allow(non_camel_case_types, non_snake_case, dead_code, missing_copy_implementations)]
     "#
-    ));
+    )?;
 
-    try!(super::gen_types(registry.api, dest));
+    super::gen_types(registry.api, dest)?;
 
     writeln!(dest, "}}")
 }
@@ -78,7 +78,7 @@ where
     W: io::Write,
 {
     for enm in &registry.enums {
-        try!(super::gen_enum_item(enm, "types::", dest));
+        super::gen_enum_item(enm, "types::", dest)?;
     }
 
     Ok(())
@@ -151,22 +151,22 @@ fn write_struct<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(
+    writeln!(
         dest,
         "
         #[allow(non_camel_case_types, non_snake_case, dead_code)]
         #[derive(Clone)]
         pub struct {api} {{",
         api = super::gen_struct_name(registry.api)
-    ));
+    )?;
 
     for cmd in &registry.cmds {
         if let Some(v) = registry.aliases.get(&cmd.proto.ident) {
-            try!(writeln!(dest, "/// Fallbacks: {}", v.join(", ")));
+            writeln!(dest, "/// Fallbacks: {}", v.join(", "))?;
         }
-        try!(writeln!(dest, "pub {name}: FnPtr,", name = cmd.proto.ident));
+        writeln!(dest, "pub {name}: FnPtr,", name = cmd.proto.ident)?;
     }
-    try!(writeln!(dest, "_priv: ()"));
+    writeln!(dest, "_priv: ()")?;
 
     writeln!(dest, "}}")
 }
@@ -176,7 +176,7 @@ fn write_impl<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
 where
     W: io::Write,
 {
-    try!(writeln!(dest,
+    writeln!(dest,
                   "impl {api} {{
             /// Load each OpenGL symbol using a custom load function. This allows for the
             /// use of functions like `glfwGetProcAddress` or `SDL_GL_GetProcAddress`.
@@ -204,10 +204,10 @@ where
                     do_metaloadfn(&mut loadfn, symbol, symbols)
                 }};
                 {api} {{",
-                  api = super::gen_struct_name(registry.api)));
+                  api = super::gen_struct_name(registry.api))?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(
+        writeln!(
             dest,
             "{name}: FnPtr::new(metaloadfn(\"{symbol}\", &[{fallbacks}])),",
             name = cmd.proto.ident,
@@ -220,19 +220,19 @@ where
                     .join(", "),
                 None => format!(""),
             },
-        ))
+        )?
     }
 
-    try!(writeln!(dest, "_priv: ()"));
+    writeln!(dest, "_priv: ()")?;
 
-    try!(writeln!(
+    writeln!(
         dest,
         "}}
         }}"
-    ));
+    )?;
 
     for cmd in &registry.cmds {
-        try!(writeln!(dest,
+        writeln!(dest,
             "#[allow(non_snake_case, unused_variables, dead_code)]
             #[inline] pub unsafe fn {name}(&self, {params}) -> {return_suffix} {{ \
                 __gl_imports::mem::transmute::<_, extern \"system\" fn({typed_params}) -> {return_suffix}>\
@@ -243,7 +243,7 @@ where
             typed_params = super::gen_parameters(cmd, false, true).join(", "),
             return_suffix = cmd.proto.ty,
             idents = super::gen_parameters(cmd, true, false).join(", "),
-        ))
+        )?
     }
 
     writeln!(
diff --git a/gl_generator/lib.rs b/gl_generator/lib.rs
index ebeb07be..c6f2b973 100644
--- a/gl_generator/lib.rs
+++ b/gl_generator/lib.rs
@@ -22,7 +22,7 @@
 //! ```no_run
 //! extern crate gl_generator;
 //!
-//! use gl_generator::{Registry, Api, Profile, Fallbacks, GlobalGenerator};
+//! use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
 //! use std::env;
 //! use std::fs::File;
 //! use std::path::Path;
@@ -31,7 +31,7 @@
 //!     let dest = env::var("OUT_DIR").unwrap();
 //!     let mut file = File::create(&Path::new(&dest).join("gl_bindings.rs")).unwrap();
 //!
-//!     Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
+//!     Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, [])
 //!         .write_bindings(GlobalGenerator, &mut file)
 //!         .unwrap();
 //! }
diff --git a/gl_generator/registry/mod.rs b/gl_generator/registry/mod.rs
index 385b2dfe..f4cd1615 100644
--- a/gl_generator/registry/mod.rs
+++ b/gl_generator/registry/mod.rs
@@ -156,7 +156,11 @@ impl Registry {
         if filter.extensions.iter().any(|e| e.starts_with("GL_ANGLE_")) {
             registry += parse::from_xml(khronos_api::GL_ANGLE_EXT_XML, &filter, false);
         }
-        if filter.extensions.iter().any(|e| e.starts_with("EGL_ANGLE_")) {
+        if filter
+            .extensions
+            .iter()
+            .any(|e| e.starts_with("EGL_ANGLE_"))
+        {
             registry += parse::from_xml(khronos_api::EGL_ANGLE_EXT_XML, &filter, false);
         }
         registry
diff --git a/gl_generator/registry/parse.rs b/gl_generator/registry/parse.rs
index c1a11a6c..4e9328bc 100644
--- a/gl_generator/registry/parse.rs
+++ b/gl_generator/registry/parse.rs
@@ -25,11 +25,7 @@ use xml::EventReader as XmlEventReader;
 use registry::{Binding, Cmd, Enum, GlxOpcode, Group, Registry};
 use {Api, Fallbacks, Profile};
 
-pub fn from_xml<R: io::Read>(
-    src: R,
-    filter: &Filter,
-    require_feature: bool,
-) -> Registry {
+pub fn from_xml<R: io::Read>(src: R, filter: &Filter, require_feature: bool) -> Registry {
     XmlEventReader::new(src)
         .into_iter()
         .map(Result::unwrap)
@@ -565,7 +561,7 @@ trait Parse: Sized + Iterator<Item = ParseEvent> {
                     let group = Group {
                         ident: ident.clone(),
                         enums_type: None,
-                        enums: self.consume_group_enums(api)
+                        enums: self.consume_group_enums(api),
                     };
                     groups.insert(ident, group);
                 },
@@ -875,8 +871,7 @@ pub fn to_rust_ty<T: AsRef<str>>(ty: T) -> Cow<'static, str> {
         "const GLint64EXT *" => "*const types::GLint64EXT",
         "const GLintptr *" => "*const types::GLintptr",
         "const GLshort *" => "*const types::GLshort",
-        "const GLsizei*" |
-        "const GLsizei *" => "*const types::GLsizei",
+        "const GLsizei*" | "const GLsizei *" => "*const types::GLsizei",
         "const GLsizeiptr *" => "*const types::GLsizeiptr",
         "const GLubyte *" => "*const types::GLubyte",
         "const GLuint *" => "*const types::GLuint",
@@ -885,8 +880,7 @@ pub fn to_rust_ty<T: AsRef<str>>(ty: T) -> Cow<'static, str> {
         "const GLushort *" => "*const types::GLushort",
         "const GLvdpauSurfaceNV *" => "*const types::GLvdpauSurfaceNV",
         "const GLvoid *" => "*const types::GLvoid",
-        "const void*" |
-        "const void *" => "*const __gl_imports::raw::c_void",
+        "const void*" | "const void *" => "*const __gl_imports::raw::c_void",
         "const void **" => "*const *const __gl_imports::raw::c_void",
         "const void *const*" => "*const *const __gl_imports::raw::c_void",
         "const GLboolean **" => "*const *const types::GLboolean",
diff --git a/khronos_api/README.md b/khronos_api/README.md
index 71576fa9..85afe4d3 100644
--- a/khronos_api/README.md
+++ b/khronos_api/README.md
@@ -8,22 +8,17 @@ The Khronos XML API Registry, exposed as byte string constants.
 
 ```toml
 [build-dependencies]
-khronos_api = "1.0.0"
+khronos_api = "3.1.0"
 ```
 
 The following constants are provided:
 
-- `GL_XML`: the contents of [`gl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml)
-- `EGL_XML`: the contents of [`egl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/egl.xml)
-- `WGL_XML`: the contents of [`wgl.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/wgl.xml)
-- `GLX_XML`: the contents of [`glx.xml`](https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/glx.xml)
-- `WEBGL_IDL`: the contents of [`webgl.idl`](https://raw.githubusercontent.com/KhronosGroup/WebGL/master/specs/latest/1.0/webgl.idl)
-- `WEBGL2_IDL`: the contents of [`webgl2.idl`](https://raw.githubusercontent.com/KhronosGroup/WebGL/master/specs/latest/2.0/webgl2.idl)
-- `WEBGL_EXT_XML`: the contents of the WebGL extension XML files
-
-## Changelog
-
-### v1.0.0
-
-- Initial release
-- Documentation improvements
+- `GL_XML`: the contents of [`gl.xml`](https://github.com/KhronosGroup/OpenGL-Registry/blob/master/xml/gl.xml)
+- `EGL_XML`: the contents of [`egl.xml`](https://github.com/KhronosGroup/EGL-Registry/blob/master/api/egl.xml)
+- `WGL_XML`: the contents of [`wgl.xml`](https://github.com/KhronosGroup/OpenGL-Registry/blob/master/xml/wgl.xml)
+- `GLX_XML`: the contents of [`glx.xml`](https://github.com/KhronosGroup/OpenGL-Registry/blob/master/xml/glx.xml)
+- `GL_ANGLE_EXT_XML`: the contents of [`gl_angle_ext.xml`](https://github.com/google/angle/blob/master/scripts/gl_angle_ext.xml)
+- `EGL_ANGLE_EXT_XML`: the contents of [`egl_angle_ext.xml`](https://github.com/google/angle/blob/master/scripts/egl_angle_ext.xml)
+- `WEBGL_IDL`: the contents of [`webgl.idl`](https://github.com/KhronosGroup/WebGL/blob/master/specs/latest/1.0/webgl.idl)
+- `WEBGL2_IDL`: the contents of [`webgl2.idl`](https://github.com/KhronosGroup/WebGL/blob/master/specs/latest/2.0/webgl2.idl)
+- `WEBGL_EXT_XML`: the contents of the WebGL extension XML files, discovered by a build script
diff --git a/khronos_api/src/lib.rs b/khronos_api/src/lib.rs
index c0bcbb3d..798459ee 100644
--- a/khronos_api/src/lib.rs
+++ b/khronos_api/src/lib.rs
@@ -33,7 +33,8 @@ pub const GLX_XML: &'static [u8] = include_bytes!("../api/xml/glx.xml");
 pub const GL_ANGLE_EXT_XML: &'static [u8] = include_bytes!("../api_angle/scripts/gl_angle_ext.xml");
 
 /// The contents of [`egl_angle_ext.xml`](https://github.com/google/angle/blob/master/scripts/egl_angle_ext.xml)
-pub const EGL_ANGLE_EXT_XML: &'static [u8] = include_bytes!("../api_angle/scripts/egl_angle_ext.xml");
+pub const EGL_ANGLE_EXT_XML: &'static [u8] =
+    include_bytes!("../api_angle/scripts/egl_angle_ext.xml");
 
 /// The contents of [`webgl.idl`](https://github.com/KhronosGroup/WebGL/blob/master/specs/latest/1.0/webgl.idl)
 pub const WEBGL_IDL: &'static [u8] = include_bytes!("../api_webgl/specs/latest/1.0/webgl.idl");
diff --git a/webgl_generator/Cargo.toml b/webgl_generator/Cargo.toml
index 39ce797d..c5d7b151 100644
--- a/webgl_generator/Cargo.toml
+++ b/webgl_generator/Cargo.toml
@@ -18,9 +18,9 @@ name = "webgl_generator"
 path = "lib.rs"
 
 [dependencies]
-khronos_api = { version = "3.0.0", path = "../khronos_api" }
-webidl = { version = "0.8" }
+khronos_api = { version = "3.1.0", path = "../khronos_api" }
+webidl = { version = "0.9" }
 heck = { version = "0.3" }
 RustyXML = "0.1"
 html2runes = "1.0"
-regex = "1.0"
+regex = "1.3"
diff --git a/webgl_generator/README.md b/webgl_generator/README.md
index 16eb2708..e1b1e575 100644
--- a/webgl_generator/README.md
+++ b/webgl_generator/README.md
@@ -17,3 +17,8 @@ See `tests/test_webgl_stdweb` for an example of how to use these generators.
 The stdweb generator is currently the only supported webgl generator. This generator
 uses `stdweb` to bind the relevant javascript APIs, and integrates with the `stdweb`
 `RenderingContext` trait.
+
+```toml
+[build-dependencies]
+webgl_generator = "0.2.0"
+```
diff --git a/webgl_generator/utils.rs b/webgl_generator/utils.rs
index b2b4fcff..7d887129 100644
--- a/webgl_generator/utils.rs
+++ b/webgl_generator/utils.rs
@@ -32,9 +32,7 @@ pub fn convert_html_to_doc_comment(html: &str) -> String {
     let doc_comment_regex = RegexBuilder::new("^").multi_line(true).build().unwrap();
 
     let md = html2runes::markdown::convert_string(html);
-    let mut doc = doc_comment_regex
-        .replace_all(md.trim_right(), "/// ")
-        .into();
+    let mut doc = doc_comment_regex.replace_all(md.trim_end(), "/// ").into();
     doc += "\n";
     doc
 }
diff --git a/webgl_generator/webgl_generators/stdweb_gen.rs b/webgl_generator/webgl_generators/stdweb_gen.rs
index c3368985..e654e404 100644
--- a/webgl_generator/webgl_generators/stdweb_gen.rs
+++ b/webgl_generator/webgl_generators/stdweb_gen.rs
@@ -424,7 +424,7 @@ where
 {
     writeln!(
         dest,
-        r#"pub type {name} = {type_};"#,
+        r#"#[allow(dead_code)] pub type {name} = {type_};"#,
         name = name,
         type_ = process_result_type(type_, registry).type_
     )?;
diff --git a/webgl_generator/webgl_registry/registry.rs b/webgl_generator/webgl_registry/registry.rs
index 3c37782f..336e6e53 100644
--- a/webgl_generator/webgl_registry/registry.rs
+++ b/webgl_generator/webgl_registry/registry.rs
@@ -203,7 +203,7 @@ impl Registry {
         use self::ast::Attribute::*;
         match attribute {
             Regular(a) => {
-                let type_ = self.load_type(*a.type_);
+                let type_ = self.load_type(a.type_);
                 Some((
                     a.name,
                     Member::Attribute(Attribute {
@@ -218,7 +218,7 @@ impl Registry {
     }
 
     fn load_argument(&mut self, argument: ast::Argument) -> Argument {
-        let type_ = self.load_type(*argument.type_);
+        let type_ = self.load_type(argument.type_);
         Argument {
             name: argument.name,
             optional: argument.optional,
@@ -242,7 +242,7 @@ impl Registry {
                                 .map(|a| self.load_argument(a))
                                 .collect(),
                             return_type: match o.return_type {
-                                ReturnType::NonVoid(t) => Some(self.load_type(*t)),
+                                ReturnType::NonVoid(t) => Some(self.load_type(t)),
                                 ReturnType::Void => None,
                             },
                             doc_comment: String::new(),
@@ -289,10 +289,10 @@ impl Registry {
     }
 
     fn load_interface(&mut self, interface: ast::NonPartialInterface) {
-        fn has_attr(attrs: &Vec<Box<ast::ExtendedAttribute>>, name: &str) -> bool {
+        fn has_attr(attrs: &Vec<ast::ExtendedAttribute>, name: &str) -> bool {
             use self::ast::ExtendedAttribute::*;
             for attr in attrs {
-                if let NoArguments(ref other) = **attr {
+                if let NoArguments(ref other) = *attr {
                     if let &ast::Other::Identifier(ref n) = other {
                         return n == name;
                     }
@@ -409,7 +409,7 @@ impl Registry {
                     TypeKind::Union(
                         inners
                             .into_iter()
-                            .map(|inner| self.load_type(*inner))
+                            .map(|inner| self.load_type(inner))
                             .collect(),
                     )
                 } else {
@@ -433,12 +433,12 @@ impl Registry {
     }
 
     fn load_typedef(&mut self, typedef: ast::Typedef) {
-        let type_ = self.load_type(*typedef.type_);
+        let type_ = self.load_type(typedef.type_);
         self.load_named_type(&typedef.name, NamedType::Typedef(type_));
     }
 
     fn load_field(&mut self, field: ast::DictionaryMember) -> (String, Field) {
-        let type_ = self.load_type(*field.type_);
+        let type_ = self.load_type(field.type_);
 
         (field.name, Field { type_ })
     }
@@ -485,7 +485,7 @@ impl Registry {
             .map(|a| self.load_argument(a))
             .collect();
         let return_type = match callback.return_type {
-            ReturnType::NonVoid(t) => Some(self.load_type(*t)),
+            ReturnType::NonVoid(t) => Some(self.load_type(t)),
             ReturnType::Void => None,
         };
         self.load_named_type(
diff --git a/webgl_stdweb/README.md b/webgl_stdweb/README.md
index 261a0fb7..57e835e5 100644
--- a/webgl_stdweb/README.md
+++ b/webgl_stdweb/README.md
@@ -1,3 +1,13 @@
 # webgl-stdweb
 
+[![Version](https://img.shields.io/crates/v/webgl_stdweb.svg)](https://crates.io/crates/webgl_stdweb)
+[![License](https://img.shields.io/crates/l/webgl_stdweb.svg)](https://github.com/brendanzab/gl-rs/blob/master/LICENSE)
+[![Downloads](https://img.shields.io/crates/d/webgl_stdweb.svg)](https://crates.io/crates/webgl_stdweb)
+
+
 WebGL bindings using stdweb
+
+```toml
+[build-dependencies]
+webgl_stdweb = "0.3.0"
+```


Test patch:
diff --git a/tests/test_gen_symbols/build.rs b/tests/test_gen_symbols/build.rs
index 26338a1e..8580d9a0 100644
--- a/tests/test_gen_symbols/build.rs
+++ b/tests/test_gen_symbols/build.rs
@@ -25,7 +25,7 @@ fn main() {
     let mut file = File::create(&Path::new(&dest).join("test_gen_symbols.rs")).unwrap();
 
     writeln!(&mut file, "mod gl {{").unwrap();
-    Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
+    Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, [])
         .write_bindings(GlobalGenerator, &mut file)
         .unwrap();
     writeln!(&mut file, "}}").unwrap();
diff --git a/tests/test_gen_symbols/lib.rs b/tests/test_gen_symbols/lib.rs
index 6e47930d..1d3efe5b 100644
--- a/tests/test_gen_symbols/lib.rs
+++ b/tests/test_gen_symbols/lib.rs
@@ -54,14 +54,18 @@ pub fn compile_test_glsc2() {
 
 pub fn compile_test_glx() {
     unsafe {
-        let _ = glx::GetProcAddress(std::mem::uninitialized());
-        glx::SwapBuffers(std::mem::uninitialized(), std::mem::uninitialized());
+        let _ = glx::GetProcAddress(std::mem::MaybeUninit::uninit().assume_init());
+        glx::SwapBuffers(
+            std::mem::MaybeUninit::uninit().assume_init(),
+            std::mem::MaybeUninit::uninit().assume_init(),
+        );
     }
 }
 
 pub fn compile_test_wgl() {
     unsafe {
-        let _: wgl::types::HGLRC = wgl::CreateContext(std::mem::uninitialized());
+        let _: wgl::types::HGLRC =
+            wgl::CreateContext(std::mem::MaybeUninit::uninit().assume_init());
     }
 }
 
@@ -80,6 +84,6 @@ pub fn compile_test_egl() {
         ];
 
         let _ = egl::GetDisplay(egl::DEFAULT_DISPLAY);
-        egl::Terminate(std::mem::uninitialized());
+        egl::Terminate(std::mem::MaybeUninit::uninit().assume_init());
     }
 }
diff --git a/tests/test_no_warnings/build.rs b/tests/test_no_warnings/build.rs
index c8ddd7c8..55fe7093 100644
--- a/tests/test_no_warnings/build.rs
+++ b/tests/test_no_warnings/build.rs
@@ -26,7 +26,7 @@ fn main() {
 
     // Gl
 
-    let gl_registry = Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, []);
+    let gl_registry = Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, []);
 
     writeln!(&mut file, "mod gl_global {{").unwrap();
     gl_registry
diff --git a/tests/test_symbols/build.rs b/tests/test_symbols/build.rs
index fcbc62c0..bf76f4b9 100644
--- a/tests/test_symbols/build.rs
+++ b/tests/test_symbols/build.rs
@@ -23,7 +23,7 @@ fn main() {
     let dest = env::var("OUT_DIR").unwrap();
     let mut file = File::create(&Path::new(&dest).join("test_symbols.rs")).unwrap();
 
-    Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
+    Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, [])
         .write_bindings(GlobalGenerator, &mut file)
         .unwrap();
 }
diff --git a/tests/test_webgl_stdweb/Cargo.toml b/tests/test_webgl_stdweb/Cargo.toml
index 490618b7..51e960df 100644
--- a/tests/test_webgl_stdweb/Cargo.toml
+++ b/tests/test_webgl_stdweb/Cargo.toml
@@ -8,10 +8,10 @@ publish = false
 path = "lib.rs"
 
 [dependencies]
-stdweb = "0.4.0"
-stdweb-derive = "0.5.0"
-serde = "1.0.0"
-serde_derive = "1.0.0"
+stdweb = "0.4"
+stdweb-derive = "0.5"
+serde = "1.0"
+serde_derive = "1.0"
 
 [build-dependencies]
 webgl_generator = { path = "../../webgl_generator" }
diff --git a/tests/test_with_extensions/build.rs b/tests/test_with_extensions/build.rs
index 01822265..337dd966 100644
--- a/tests/test_with_extensions/build.rs
+++ b/tests/test_with_extensions/build.rs
@@ -24,7 +24,7 @@ fn main() {
     let mut file = File::create(&Path::new(&dest).join("test_symbols.rs")).unwrap();
     let extensions = ["GL_ARB_debug_output"];
 
-    Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, extensions)
+    Registry::new(Api::Gl, (4, 6), Profile::Core, Fallbacks::All, extensions)
         .write_bindings(GlobalGenerator, &mut file)
         .unwrap();
 }