Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Welcome to Derelict

Derelict is a collection of D bindings to C shared (dynamic) libraries which are useful for multimedia applications, with a heavy bias toward game development-related libraries.

Features

Derelict supports some useful features for project development, including:

  • Cross-Platform Consistency - No matter which platform you release on, Derelict loads shared libraries manually at runtime and throws an exception when the library, or any symbol in the library, fails to load. This gives you complete control over how to handle the case of a missing shared library. You can fall back to a different code path, give your users a helpful error message, or take any action you want. Regardless, you have consistent behavior across multiple platforms.
  • Selective Symbol Loading - This feature allows you to override exceptions thrown by Derelict when a shared library symbol fails to load. It is a goal of the project that each Derelict package be updated from time-to-time to load the latest version of each library. Often, new library versions include new functions. If a user has an older version of the library installed, one that is missing the new function symbols, Derelict will notice and throw an exception. By making use of Selective Symbol Loading, you can override this behavior and allow the older library version to load successfully.

Versions

Derelict isn't versioned in the traditional sense. There's no such thing as major.minor.build or any other such scheme that makes sense for the project. It is, after all, just a collection of bindings. But there are three distinct versions of Derelict, with differences in compiler & standard library support and implementation details.

Derelict 1 is is still around, but it's safe to say that project is basically dead. It supported both Phobos and Tango, but only worked with the D1 compilers. It was superceeded by Derelict 2, of which you can read more about below.

The latest version is Derelict 3, which eliminates a few packages, updates some others (like moving from SDL 1.2 to SDL 2), and drops support for D1 and Tango. It is still in and alpha state and probably unsuitable for anyone who doesn't know their way around a command line. If you need to use SDL 2, OpenGL 3+ (without the deprecated features) or GLFW 3, Derelict 3 is the place to be. You can find it over at github: https://github.com/aldacron/Derelict3

Derelict2

Work on a revamped Derelict began in March of 2009. All of the major work is complete, such as the important bits of documentation and the priority packages. All that's missing is a few minor details, but it is quite usable and should be the preferred version of Derelict for most people. It differs from Derelict 1 in that it has:

  • support for D1, D2, Phobos, and Tango
  • a streamlined package hierarchy
  • a configurable make-based build system intended to replace the dependency on build tools
  • easier addition of Derelict modules to the import path
  • a much improved OpenGL extension management interface in DerelictGL
  • a redesigned loading mechanism, making it easier to implement and maintain packages

You can start by checking out the Derelict2 branch at: http://svn.dsource.org/projects/derelict/branches/Derelict2

Or browse the source online at: http://www.dsource.org/projects/derelict/browser/branches/Derelict2

The documentation is mostly complete. Everything you need to know to compile and use Derelict can be found at: http://svn.dsource.org/projects/derelict/branches/Derelict2/doc/index.html

The documentation is also included when you checkout or download the source tree from the repository.

Important information regarding Derelict2 to help get you going can be found in sticky topics in the forums. Just ask in the forums if you have trouble.

Projects that use Derelict