diff --git a/Cargo.toml b/Cargo.toml index 6b380d9..f0abdf5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,8 @@ libc = "*" log = "*" gleam = "0.1" euclid = "0.1" +serde = "*" +serde_macros = "*" [dependencies.layers] git = "https://github.com/servo/rust-layers" diff --git a/src/gl_context_attributes.rs b/src/gl_context_attributes.rs index 04ef7c1..8bc58c9 100644 --- a/src/gl_context_attributes.rs +++ b/src/gl_context_attributes.rs @@ -1,7 +1,7 @@ /// This structure represents the attributes the context must support /// It's almost (if not) identical to WebGLGLContextAttributes -#[derive(Clone, Debug, Copy)] +#[derive(Clone, Debug, Copy, Deserialize, Serialize)] pub struct GLContextAttributes { pub alpha: bool, pub depth: bool, diff --git a/src/lib.rs b/src/lib.rs index e15c4e5..b676742 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,11 @@ +#![feature(custom_derive)] +#![feature(plugin)] +#![plugin(serde_macros)] + extern crate gleam; extern crate libc; extern crate euclid; +extern crate serde; #[cfg(target_os="linux")] extern crate x11;