Warning
This project is currently in alpha, bugs may be present when used.
orbit is a microtranspiler1 that generates Lua from Zig code — focused on typesafe code generation.
Inspired by ziglua and c2z, orbit aims to be a simple, easy-to-replicate transcompiler1 solution for DCS modding and universal language adoption.
-
Typesafe, selective transpilation.
Zig is our language of choice for typesafe programming, but is only being leveraged to a certain extent. Because of this, orbit is philosophically built on only achieving certain Zig behaviours in Lua.
Learn more →
-
Heap memory performant.
With heavy heap allocations, you can expect a program that treats your memory like a limit, not a suggestion. Structs, enums, tables, variables (constant) & imperative logic are compressed into efficient Lua operations.
-
Scalable & modular.
orbit's structure is meant to serve as a proof-of-concept and working prototype for any [insert]-to-Lua (LVM) programs.
Learn more →
-
Download
-
Usage
This is an non-exhaustive list of items being tracked for the orbit roadmap. You can learn more about it here:
If you are wanting to build from source, enter the following commands into your command line:
$ git clone --recursive https://github.com/snwfke/orbit
$ cd ./orbit/
$ zig buildOptionally, you can skip over the $ git clone process and build from within the target folder.
If orbit is used as a library, your build.zig file needs the following code:
const orbit_module = b.dependency("orbit", .{}).module("orbit");
exe.addModule("orbit", orbit_module);Otherwise, orbit is intended to be used as a compiled executable:
$ cd orbit
$ zig build
$ "zig-out/orbit -F test.zig -o generated.lua"Footnotes
-
This is an alternative name to a source-to-source compiler, majorly responsible the pragmatics in language-to-language conversion. ↩ ↩2