Skip to content

snwfke/orbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orbit

Caution

This is a release candidate. Undesired behaviour 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.

Features

      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 →

Table of Contents

Roadmap

This is an non-exhaustive list of items being tracked for the orbit roadmap. You can learn more about it here:

Building

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 build

Optionally, you can skip over the $ git clone process and build from within the target folder.

Getting Started

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

  1. This is an alternative name to a source-to-source compiler, majorly responsible the pragmatics in language-to-language conversion. 2

About

A "microtranspiler" that generates Lua from Zig – focused on typesafe code generation.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors