Languages that compile to Lua

Overview

lua-languages

Languages that compile to Lua

Lua is famously and deceptively simple and enables many different programming paradigms. Like Javascript, it's possible to make it shine by adding more specialized syntax. I started this list to document the languages I found looking for an ML/F# like language.

Pull requests welcome!

Compile to bytecode

An intriguing new avenue of development started by Rochus Keller for an Oberon to LuaJIT bytecode compiler provides an elegant way of leveraging the ecosystem:

VM forks

Tier 1

For lack of a better designator, these projects are well known, or compiles existing languages

Typed Lua

Binary compiled Lua-like

Strongly typed

Javascript

TypeScript

Functional

Lisp

There are so many Lisp variants, the deserve their own category.

C

Python

Ruby

Unique

Other

Issues
  • Compiling to LuaJIT bytecode

    Compiling to LuaJIT bytecode

    I'm particularly interested in reusing LuaJIT on bytecode level. As far as I can see my Oberon implementation currently seems to be the only one directly compiling to LuaJIT bytecode, i.e. everyone else seems to transpile to Lua source code (maybe there is another language doing this which I missed up to now). The major disadvantage of Lua as an intermediate language is the fact that line numbers reported by the debugger refer to the wrong source file (the intermediate Lua instead of the original source). I implemented a full IDE (https://github.com/rochus-keller/oberon/#oberon-ide-features) which - with a slight modification of LuaJIT - even supports row and column numbers (not only row numbers as with the original Lua engines). I don't see a way how to do this when Lua is the intermediate language. Also worth mentioning that the Oberon code compiled to bytecode runs nearly the same speed as the Oberon to native compiled version and twice as fast as the Oberon to Lua source code transpiled version (see https://github.com/rochus-keller/Oberon/blob/master/testcases/Hennessy_Results).

    For me (and maybe others too) it would be helpful to explicitly track on the list which languages compile to Lua source code or LuaJIT bytecode. For people who would like to implement a bytecode backend you could add https://github.com/rochus-keller/LjTools and https://github.com/franko/luajit-lang-toolkit. Thanks.

    opened by rochus-keller 2
  • Found these typescript to lua projects

    Found these typescript to lua projects

    • https://github.com/TypeScriptToLua/TypeScriptToLua
    • https://github.com/roblox-ts/roblox-ts
    • https://github.com/ASDAlexander77/TypeScriptLua

    PS: Nice project!

    opened by r-lyeh 2
  • Compiling Python to Lua

    Compiling Python to Lua

    There's a Python-to-Lua compiler called python-lua, but it isn't included in this list of Python-to-Lua compilers. Should this compiler be included in the list?

    opened by jarble 2
  • Added candran

    Added candran

    @hengestone Was looking around and found candran and hence added it to this list (added it to the unique category).

    Sorry if I was supposed to open an issue first.

    opened by mystery-z 1
  • could someone build a windows x64 exe?

    could someone build a windows x64 exe?

    I am interest in functional language. but i don't know how to build listed project.

    I only build Hypatia success. all other falled.

    Functional https://amulet.works/ An ML-like functional programming language that transpiles to lua https://github.com/kindl/Hypatia Hypatia, an ML-like language that transpiles to Lua https://github.com/ptol/oczor Haskell-like language that compiles to Lua, Javascript, Emacs lisp and Ruby https://github.com/iitalics/Lua-ML Basic ML language https://github.com/hengestone/pumpkin ML-like language with an experimental Lua back-end https://github.com/minoki/LunarML A Standard ML compiler that produces Lua

    opened by vkensou 1
  • Update link to Amulet

    Update link to Amulet

    Since Amulet was added to the list, it has moved to its own organization, and now has its own website. This PR replaces the link to the old Amulet repository with the URL to the website.

    opened by MCJack123 1
  • Alternative JS-based syntax for Lua

    Alternative JS-based syntax for Lua

    This is neither a completely new language, nor a JS to Lua compiler. Just an alternative syntax with syntaxic sugar that is missing in Lua. https://github.com/saharNooby/lua-js-syntax

    Also, other similar projects (not mine) you may be interested in:

    • ljs: C Lua VM fork with JS-like syntax.
    • jual: C Lua VM fork with JS-like syntax that is a ECMAScript subset.
    • Killa: C Lua VM fork with JS-like syntax.
    opened by saharNooby 1
  • Some

    Some "compilers" seems to be "removed"

    Hey there, I was looking for Javascript and/or Typescript compilers when I found this list.

    Some of the compilers linked here are returning 404. I cant find if they were moved to somewhere or just deleted.

    • https://github.com/josevalim/luascript
    • https://github.com/freedot/tstolua
    opened by frenetic 1
  • Shine: a general purpose, dynamic, multi-paradigm programming language

    Shine: a general purpose, dynamic, multi-paradigm programming language

    Here is yet another one which you could add to your list: https://github.com/richardhundt/shine And have you been aware of TvmJIT (I wasn't so far)? Here is a link: https://github.com/perl11/tvmjit. It implements an s-expression based language on top of LuaJIT.

    opened by rochus-keller 1
  • Oberon to LuaJIT transpiler

    Oberon to LuaJIT transpiler

    Nice collection, just discovered now. In case you're interested, this code currently translates Oberon-07 to LuaJIT specific Lua source code: https://github.com/rochus-keller/Oberon/. Here is an article describing the concepts: https://medium.com/@rochus.keller/implementing-call-by-reference-and-call-by-name-in-lua-47b9d1003cc2. A direct to bytecode compiler is on its way. The goal is to have an easy to handle platform to implement various frontends of statically/strongly typed languages, leaner than an LLVM solution, and easier and faster than the RPython toolchain. There is already some infrastructure for LuaJIT bytecode analysis and an alternative interpreter implementation for exploration purpose: https://github.com/rochus-keller/LjTools.

    opened by rochus-keller 1
  • Add Erde

    Add Erde

    Howdy, I was doing some digging and discovered another language that complies into Lua called Erde.

    https://erde-lang.github.io

    I also discovered another language called Wren, but I don't believe it compiles into Lua but its extremely similar to Lua.

    https://wren.io

    opened by Jamtoad 0
Owner
Conrad Steenberg
Conrad Steenberg
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)

debugger.lua A simple, embedabble debugger for Lua 5.x, and LuaJIT 2.x. debugger.lua is a simple, single file, pure Lua debugger that is easy to integ

Scott Lembcke 576 Jul 23, 2022
The Lua development repository, as seen by the Lua team. Mirrored irregularly

The Lua development repository, as seen by the Lua team. Mirrored irregularly

Lua 5.9k Aug 7, 2022
Crashser - open source dump/crash server for different programming languages

Crashser - open source dump/crash server for different programming languages (used for crash analysis in various applications). This library is crossplatfrom (now only Windows, Linux, OSX) implementation C++ client for Crasher dump/crash server.

Balun Vladimir 17 Oct 24, 2021
Mix C with other programming languages

extern "C" This project demonstrates how to mix C with other programming languages. It aims to create a Rosetta Stone of the procedure shown in the fo

Ralph 12 Mar 25, 2022
A collection of scripts written in many different programming languages and each developed independently to perform very specific tasks (big or small)

Script Collection A collection of scripts written in many different programming languages and each developed independently to perform very specific ta

Giovanni Rebouças 5 Aug 31, 2021
Daily challenge on algorithm, using different languages.

??‍?? DailyChallenges Content General Information Setup Usage Languages Enhancements ?? General Information These Daily challenges are aimed at growin

Black Hackers 6 Mar 7, 2022
CONTEST 7 : 🥳 #snipathon-21🥳 contribute your favour code snippets in different languages

Your Favorite Code Snippet Collection of code snippets that can be anything from hello world to Complex Algo & DS (In any programming language). How t

CodeMacrocosm 8 Oct 31, 2021
Programming codes of various languages

Programing-Notes Programming codes of various languages like C,C++,Python,Java,etc. If you have good quality of codes only then make PR. Simple codes

Abhinandan Goyal 3 Dec 29, 2021
A beginner friendly repo in the world of open source. Contribute here to add here project in any languages.

Hacktober Fest 2021 Heyy There (●'◡'●) Here you can contribute to opensource project in any valid language and project. Just follow the contribution g

Anonymous-inception 6 May 24, 2022
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.

The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text. Diff: Compare two blocks o

Google 5.5k Aug 8, 2022
A bytecode interpreter for statically typed functional languages.

A bytecode interpreter for statically typed functional languages.

Luc Tielen 2 Dec 25, 2021
Jaws is an invisible programming language! Inject invisible code into other languages and files! Created for security research -- see blog post

Jaws is an invisible interpreted programming language that was created for antivirus research. Since Jaws code is composed entirely of whitespace char

C.J. May 207 Jul 30, 2022
Shader languages support for VS Code

vscode-shader Description Shader languages support for VS Code HLSL - High-Level Shading Language GLSL - OpenGL Shading Language Cg - C for Graphics M

null 140 Jul 18, 2022
SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages.

SPIRV-Cross SPIRV-Cross is a tool designed for parsing and converting SPIR-V to other shader languages. Features Convert SPIR-V to readable, usable an

The Khronos Group 1.5k Aug 7, 2022
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages

ShaderConductor ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages. Features Converts HLSL to readable, usable and

Microsoft 1.5k Jul 26, 2022
Modern C++ 20 compile time OpenAPI parser and code generator implementation

OpenApi++ : openapipp This is a proof of concept, currently under active work to become the best OpenAPI implementation for C++. It allows compile tim

tipi.build 5 Apr 8, 2022
Project PLS is developed based on icarus iverilog and will compile verilog into a much faster optimized model.

Getting Started with PLS The project is developed based on icarus iverilog. Special thanks to Stephen Williams ([email protected]). PLS is a Verilog si

null 7 Jan 11, 2022
A commented version of my libft, with details about how my algorithms work and simple main functions to compile them.

LIBFT COMMENTED VERSION : ?? PART I : ?? FT_STRCHR : ?? PART II : ?? FT_SUBSTR : /* * DEFINITION : * CREATES A SUBSTRING FROM A STRING WITH PREDETER

Abdessamad Laamimi 1 Nov 11, 2021