SDK Libraries

The Leap Motion SDK contains two basic libraries that define the API to the Leap Motion tracking data. One library is written in C++, the second is written in C. Wrapper classes for these libraries define language bindings for C# and Objective-C. Language bindings for Java and Python use SWIG, an open source tool. The SWIG-generated bindings translate calls written in the bound programming language to calls into the base C++ Leap Motion library. Each SWIG binding uses two additional libraries. For JavaScript and web application development, Leap Motion provides a WebSocket server and a client-side JavaScript library.

All the library, code, and header files required to develop Leap-enabled applications and plugins are included in the Leap Motion SDK, except the leap.js client JavaScript library. You can download the Leap Motion SDK from the Leap Motion Developer Portal. An SDK package is available for each supported operating system. The JavaScript client library is distributed separately and can be downloaded from the LeapJS GitHub repository.

Plugins for Unity 5 and Unreal Engine 4 are provided separately from the main SDK. The Unreal plugin is included with Unreal Engine 4. The Unity plugin is available at

Supported Compilers and IDEs

  • C++ on Windows: Visual Studio 2008, 2010, 2012, and 2013
  • C++ on Mac: Xcode 3.0+, clang 3.0+, and gcc
  • Objective-C: Mac OS 10.7+, Xcode 4.2+ and clang 3.0+
  • C# for .NET framework versions 3.5+
  • Mono version 2.10
  • Unity Pro and Personal versions 5.3+
  • Java versions 6 and 7
  • Python version 2.7.3
  • UnrealEngine 4.9+

Python contains the Python module that you reference in your Python application. This module loads (Mac and Linux) or LeapPython.dll (Windows). These libraries load libLeap.dylib, Leap.dll, or (depending on platform).


To develop for the Leap Motion Controller in C++, include the API header files in your program and link with the Leap Motion library, either libLeap.dylib, Leap.dll, or, depending on platform.

On Windows, separate libraries are provided for 32-bit versus 64-bit architectures as well as debug builds versus release builds (for a total of 4 versions for each component).

On Mac OS X, both architectures and release modes are supported in a single library file.


Objective-C applications are supported by hand-written wrapper code. To build a Leap-enabled Objective-C application, include the wrapper header and Objective-C++ code file in your application along with the Leap Motion C++ headers. You can then use the classes defined in the wrapper in (otherwise) pure Objective-C applications. Link your application with libLeap.dylib and include the library in your application package.


The C# class definitions are provided in the src directory. To build a Leap-enabled C# application, include the wrapper cs files in your appplication. Your application code should reference the Leap namespace. Also include libLeapC.dylib (Mac), LeapC.dll (Windows), or (Linux) as a runtime library.


As of Unity 5, both the Pro and Personal versions support plugins. The Unity plugin uses the C# class definitions in LeapC folder of the core assets. This library loads the native LeapC.dll (Windows) library.


Leap.jar contains the Leap Motion Java classes. This code loads libLeapJava.dylib (Mac), LeapJava.dll (Windows), or (Linux). These libraries contain the native code that translates the Java calls to the base Leap Motion API in libLeap.dylib, Leap.dll, or (depending on platform). The base Leap Motion dynamic library is loaded by the intermediate library. For Windows 64-bit architectures, the Microsoft Visual C runtime libraries are also required.


Leap Motion JavaScript support has two main components. The first component is the WebSocket server provided by the Leap Motion service. This server allows web applications (or any application that can connect to a WebSocket) to access Leap Motion tracking data as JSON-formatted messages. The second component is the JavaScript client library, Leap.js. Leap.js is an open-source JavaScript API that consumes the WebSocket JSON output and presents it in a form that is consistent in philosophy and structure to the native Leap Motion API.

Other Languages

Many community-created language bindings are available, for a partial list, visit: Community Libraries.

Operating System Support

The Leap Motion software currently supports Linux (Ubuntu 12), OS X 10.7+, Windows 7+.