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 transcompilation
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 →
-
Memory performant
With heavy allocator usage, you can expect a program that treats your memory as a limit, not a suggestion. Structs, enums, tables, variables (constant) & imperative logic are compressed into efficient Lua operations.
-
Scalable & modular
orbit's LVM structure is scaled by the desired behaviour and modularised in target-to-source translation, allowing it to be used as a cookie-cutter template for other [insert]-to-Lua (LVM) programs.
Learn more →
-
Download
-
Usage
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.zig"Footnotes
-
This is an alternative name to a source-to-source compiler, majorly responsible the pragmatics in language-to-language conversion. ↩ ↩2