moonjit ======= moonjit is a fork of the [LuaJIT project](https://repo.or.cz/w/luajit-2.0.git) authored by Mike Pall with the aim of providing a quicker paced and more inclusive development workflow for LuaJIT. The original README is preserved below for now. This fork is an attempt to provide continuity for users of the original LuaJIT but will allow space to innovate and fix bugs. LuaJIT is Copyright (c) 2005-2019 Mike Pall and various contributors. The list of contributors may be found via the git log and from the CONTRIBUTORS file in the top level of these sources, which is updated on a regular basis. Branches -------- The project repository on github has the following main branches: * master: This is where new features and language support will land. This may diverge from the original LuaJIT, although as the goal of this project suggests, attempts will be made to remain as compatible as possible. * v2.1: This remains a bug fix branch for this repository and will be regularly merged with the upstream v2.1 branch. * v2.0: This remains a bug fix branch that tracks the v2.0 branch upstream. The upstream master branch currently only tracks the v2.0 branch (or vice versa, we may never know!) so it is ignored. Additional Features ------------------- * New API function thread.exdata to embed user data in LuaJIT threads. This API needs FFI and hence is not available when built with `-DLUAJIT_DISABLE_FFI`. The Lua API can be used like below: local exdata = require "thread.exdata" exdata(0xdeadbeefLL) -- set the exdata of the current Lua thread local ptr = exdata() -- fetch the exdata of the current Lua thread The exdata value on the Lua land is represented as a cdata object of the ctype "void*". Right now the reading API, i.e., `exdata()` calls without any arguments, can be JIT compiled. Also exposed the following public C API functions for manipulating exdata on the C land: void lua_setexdata(lua_State *L, void *exdata); void *lua_getexdata(lua_State *L); The exdata pointer is initialized to NULL when the main thread is created. Any child Lua threads created will inherit the parent's exdata but still have their own exdata storage. So child Lua threads can always override the inherited parent exdata pointer values. This API is used internally by the OpenResty core so never ever mess with it yourself in the context of OpenResty. Original README =============== README for LuaJIT 2.1.0-beta3 ----------------------------- LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. Project Homepage: http://luajit.org/ LuaJIT is Copyright (C) 2005-2017 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h. Documentation for LuaJIT is available in HTML format. Please point your favorite browser to: doc/luajit.html