开源软件名称(OpenSource Name):Roblox/luau开源软件地址(OpenSource Url):https://github.com/Roblox/luau开源编程语言(OpenSource Language):C++ 78.2%开源软件介绍(OpenSource Introduction):LuauLuau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. It is designed to be backwards compatible with Lua 5.1, as well as incorporating some features from future Lua releases, but also expands the feature set (most notably with type annotations). Luau is largely implemented from scratch, with the language runtime being a very heavily modified version of Lua 5.1 runtime, with completely rewritten interpreter and other performance innovations. The runtime mostly preserves Lua 5.1 API, so existing bindings should be more or less compatible with a few caveats. Luau is used by Roblox game developers to write game code, as well as by Roblox engineers to implement large parts of the user-facing application code as well as portions of the editor (Roblox Studio) as plugins. Roblox chose to open-source Luau to foster collaboration within the Roblox community as well as to allow other companies and communities to benefit from the ongoing language and runtime innovation. This repository hosts source code for the language implementation and associated tooling, documentation for the language as well as RFCs and other materials. The documentation portion of this repository can be viewed at https://luau-lang.org/ UsageLuau is an embeddable language, but it also comes with two command-line tools by default,
You can download the binaries from a recent release. BuildingTo build Luau tools or tests yourself, you can use CMake on all platforms: mkdir cmake && cd cmake
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build . --target Luau.Repl.CLI --config RelWithDebInfo
cmake --build . --target Luau.Analyze.CLI --config RelWithDebInfo Alternatively, on Linux/macOS you can use make: make config=release luau luau-analyze To integrate Luau into your CMake application projects, at the minimum you'll need to depend on // needs lua.h and luacode.h
size_t bytecodeSize = 0;
char* bytecode = luau_compile(source, strlen(source), NULL, &bytecodeSize);
int result = luau_load(L, chunkname, bytecode, bytecodeSize, 0);
free(bytecode);
if (result == 0)
return 1; /* return chunk main function */ For more details about the use of host API you currently need to consult Lua 5.x API. Luau closely tracks that API but has a few deviations, such as the need to compile source separately (which is important to be able to deploy VM without a compiler), or lack of To gain advantage of many performance improvements it's highly recommended to use TestingLuau has an internal test suite; in CMake builds it is split into two targets, Makefile builds combine both into a single target and can be ran via DependenciesLuau 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. The test suite depends on doctest testing framework, and the REPL command-line depends on isocline. LicenseLuau 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. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论