Skip to content

LuaU sources packaged into two files for easy embedding (just copy+paste them into your project).

License

Notifications You must be signed in to change notification settings

UtoECat/miniLuau

Repository files navigation

MiniLuau

This repository implements the PACK.lua lua script for packing official Luau sources (only compiler, native code generation and vm at the moment) into TWO FILES: luau.hpp and luau.cpp, which you can simply drag and drop into your C++ project.

Building

Note: luau.h and luau.c are ALREADY AUTOMATICLY packed in this repository! Do manual packaging only if you really want to change this process in some way or speed up getting the latest version of Luau. If you want to package sources manually, you need to install Lua 5.4, git.

First clone this repository with this command:

 $ git clone --recursive https://github.com/UtoECat/miniLuau

Then cd to the luau submodule directory and run

$ lua5.4 ../PACK.lua

During the build process, you will see errors about <string.h> or <vector> not found, this is normal. At the end you will get your packaged luau sources :)

Usage

  • Put packed files in your project, compile as any other source file
  • Add -lm to your linker flags (if not done yet)
  • Modify definitions at the top of luau.hpp file (disable compiler or native code generation)
  • include luau.hpp everywhere you need to work with lua.

Dependencies

Luau uses C++ as its implementation language. The runtime requires C++11, whereas the compiler and analysis components require C++17. It should build without issues using Microsoft Visual Studio 2017 or later, or gcc-7 or clang-7 or later.

Other than the STL/CRT, Luau library components don't have external dependencies.

License

Luau implementation is distributed under the terms of MIT License. It is based on Lua 5.x implementation that is MIT licensed as well.

When Luau is integrated into external projects, we ask to honor the license agreement and include Luau attribution into the user-facing product documentation. The attribution using Luau logo is also encouraged.

Pack.lua is also under the MIT license.

Luau

Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua.

This is not the original Luau repository. Visit Original Luau repository for more information about LuaU.

The documentation portion for Luau language can be viewed at Luau-Lang website

Baselib documentation

Is here (click)

About

LuaU sources packaged into two files for easy embedding (just copy+paste them into your project).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published