Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A JNA backed, JSR-223 compliant Lua language binding for Java.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .classpath
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .project
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 lua.jar
README.md

jna-lua is a JSR-223 compliant Lua language binding for Java.

This project is a complete and small language binding for Lua 5.1. It uses the existing reference implementation from PUC-Rio, written in C. Access to the native code is provided by JNA, so no JNI code is required.

This implementation provides two-way integration between Java and Lua. It also strives to be a fully compliant implementation of the JSR-233 specification.

The C API can be found in lua.jar. This jar was created by JNAerator, and it contains the interfaces to the functions contained in lua.h, lauxlib.h, and lualib.h. The function names have not been modified, so they remain prefixed with lua_* or luaL_. While this makes the method names uglier, it also keeps the API as simple as possible.

jna-lua is intended to be small and simple, so it excludes some features found in other implementations. Specifically, jna-lua does not include a separate Lua compiler or Java implementation of Lua. It also does not include any native code; it depends entirely on the existing Lua C libraries being available.

Alternatives

  • JNLua -- similar to this project
  • LuaJava -- oldest and arguably the most popular
  • kahlua -- Lua re-implemented in Java

See also

Something went wrong with that request. Please try again.