Skip to content
openflPublic

About

A foundational Haxe framework for cross-platform development

Topics

Resources

Contributing

Stars

856 stars

Watchers

47 watching

Forks

Latest commit

 

History

6,418 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License Haxelib Version Build Status Community Discord Server

Lime

Lime is a flexible, lightweight layer for Haxe cross-platform developers.

Lime supports native, Flash and HTML5 targets with unified support for:

  • Windowing
  • Input
  • Events
  • Audio
  • Render contexts
  • Network access
  • Assets

Lime does not include a renderer, but exposes the current context:

  • Cairo
  • Canvas
  • DOM
  • Flash
  • GL
  • Vulkan

The GL context is based upon the WebGL standard, implemented for both OpenGL and OpenGL ES as needed. Where a desktop has no usable GPU OpenGL, native windows fall back to Cairo. With the software-gl define, Windows, macOS and Linux try OpenGL drawn in software first: Mesa's llvmpipe on Windows and Linux, and Apple's software renderer on macOS. Windows builds copy Mesa from the lime-mesa haxelib into a mesa folder beside the executable, for 64-bit builds without angle. Linux needs Mesa installed. On Apple silicon, Apple's software renderer draws some lines and textures wrongly (actions/runner-images#9712). A context drawn in software reports window.context.attributes.hardware as false. To test a software-gl build as a machine without a GPU would run it, set the LIME_SOFTWARE_GL=1 environment variable. Native Vulkan support exposes an explicit Vulkan API layer for renderer backends, including native window/swapchain integration and resource/command primitives. Native Vulkan support is included in standard Windows, Linux and Android Lime builds. Windows and Linux C++ builds also define the matching Haxe API, and on Android the vulkan define turns it on. Apple targets still require an explicit Vulkan-enabled build and MoltenVK packaging. To request a Vulkan window, use the standard RenderContextType.VULKAN context selection, or build with -Dvulkan (or <define name="vulkan" /> before <haxelib name="lime" /> in project XML) to make Vulkan the default for windows that name no type. The in-repo tests/vulkan-smoke project is used as the current Vulkan CI smoke app.

Lime provides a unified audio API, but also provides access to OpenAL for advanced audio on native targets.

License

Lime is free, open-source software under the MIT license.

Installation

First, install the latest version of Haxe.

Then, install Lime from Haxelib and run Lime's setup command.

haxelib install lime
haxelib run lime setup

Development Builds

When there are changes, Lime is built nightly. Builds are available for download here.

To install a development build, use the "haxelib local" command:

haxelib local lime-haxelib.zip

Building from Source

  1. Clone the Lime repository, as well as the submodules:

     haxelib git lime https://github.com/openfl/lime
    
  2. Install required dependencies:

     haxelib install format
     haxelib install hxp
     haxelib install native-desktop 1.1.0
     haxelib install native-ipc 1.0.0
     haxelib install StageWebView 1.0.1
     haxelib install wsproto 1.0.0
     haxelib install crossbyte 1.0.1
    
  3. Copy the ndll directory from the latest Haxelib release, or see project/README.md for details about building native binaries.

  4. After any changes to the tools or lime/tools directories, rebuild from source:

     lime rebuild tools
    

    This needs Haxe 4.3 or later, for CrossByte, which serves lime test html5. Applications still build with older Haxe versions.

  5. To switch away from a source build:

     haxelib set lime [version number]
    

Sample

You can build a sample Lime project with the following commands:

lime create HelloWorld
cd HelloWorld
lime test neko

You can also list other projects that are available using "lime create".

Targets

Lime currently supports the following targets:

lime test windows
lime test mac
lime test linux
lime test android
lime test ios
lime test html5
lime test flash
lime test air
lime test neko
lime test hl

Desktop builds are currently designed to be built on the same host OS

Join the Community

Have a question? Want a new place to hang out?

About

A foundational Haxe framework for cross-platform development

Topics

Resources

Contributing

Stars

856 stars

Watchers

47 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages