diff --git a/Makefile.in b/Makefile.in index 51691c6..75d43fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,7 +9,7 @@ RUST_SRC=$(shell find $(VPATH)/. -type f -name '*.rs') all: libsharegl.dummy libsharegl.dummy: lib.rs $(RUST_SRC) - $(RUSTC) $(RUSTFLAGS) $< --lib --out-dir . + $(RUSTC) $(RUSTFLAGS) $< --crate-type=lib --out-dir . touch $@ sharegl-test: lib.rs $(RUST_SRC) diff --git a/context.rs b/context.rs index d1f620c..ffb83cf 100644 --- a/context.rs +++ b/context.rs @@ -9,7 +9,7 @@ //! A platform-independent interface to 3D graphics contexts. -use extra::arc::Arc; +use sync::Arc; /// Platform-independent interface to 3D graphics contexts. pub trait GraphicsContextMethods { diff --git a/lib.rs b/lib.rs index 2f0f0a8..f5a4147 100644 --- a/lib.rs +++ b/lib.rs @@ -9,16 +9,17 @@ #[crate_id = "github.com/mozilla-servo/sharegl#0.1"]; -extern mod std; -extern mod extra; -extern mod geom; +extern crate std; +extern crate sync; +extern crate extra; +extern crate geom; #[cfg(target_os="macos")] -extern mod core_foundation; +extern crate core_foundation; #[cfg(target_os="macos")] -extern mod io_surface; +extern crate io_surface; #[cfg(target_os="macos")] -extern mod opengles; +extern crate opengles; pub mod base; pub mod context; diff --git a/platform/linux.rs b/platform/linux.rs index 9733e48..35a6724 100644 --- a/platform/linux.rs +++ b/platform/linux.rs @@ -11,15 +11,14 @@ use context::GraphicsContextMethods; use std::libc::{c_char, c_int, c_long, c_uint, c_ulong, c_void}; use std::ptr::null; -use std::ptr; -use extra::arc::Arc; +use sync::Arc; // Constants. static GLX_RGBA: c_int = 4; -static GLX_RED_SIZE: c_int = 8; +/*static GLX_RED_SIZE: c_int = 8; static GLX_GREEN_SIZE: c_int = 9; -static GLX_BLUE_SIZE: c_int = 10; +static GLX_BLUE_SIZE: c_int = 10;*/ static GLX_DEPTH_SIZE: c_int = 12; static ATTRIBUTES: [c_int, ..4] = [ @@ -164,7 +163,7 @@ fn RootWindow(dpy: *Display, scr: c_int) -> Window { } fn ScreenOfDisplay(dpy: *Display, scr: c_int) -> *Screen { unsafe { - *ptr::offset(&(*dpy).screens, scr as int) + (&(*dpy).screens).offset(scr as int) } } diff --git a/platform/macos.rs b/platform/macos.rs index b059c28..c0be46e 100644 --- a/platform/macos.rs +++ b/platform/macos.rs @@ -10,7 +10,7 @@ use base::ShareContext; use context::GraphicsContextMethods; -use extra::arc::Arc; +use sync::Arc; use geom::size::Size2D; use io_surface::{IOSurface, kIOSurfaceBytesPerElement, kIOSurfaceBytesPerRow}; use io_surface::{kIOSurfaceHeight, kIOSurfaceIsGlobal, kIOSurfaceWidth};