source
large_stringlengths
17
66
seed
large_stringclasses
1 value
crawled_at
timestamp[us, tz=UTC]date
2026-10-01 05:58:55
2026-10-01 05:58:59
content
large_stringlengths
52
88.5k
tokens
int64
16
21.9k
content_hash
large_stringlengths
64
64
https://luau.org/
https://luau.org/
2026-10-01T05:58:55.360393Z
![Hina, a Hawaiian monk seal and the official mascot of the Luau language](/_astro/mascot.iwZjauS8_1jdjiU.webp) # Luau Luau (lowercase *u*, /ˈlu.aʊ/) is a small, fast, and embeddable programming language based on Lua with a gradual type system. [Get Started](/getting-started/) [News](/news/) [Try Luau online](ht...
622
3ed4d1c052611afe6cd10c0fe588f69f8906afc651a5a04af17d708dcdcd518a
https://luau.org/news
https://luau.org/
2026-10-01T05:58:55.812676Z
# News The latest news from the Luau team! Stay up to date with new features, performance improvements, and language updates. [Luau Recap for 2025: Runtime Posted December 19, 2025](/news/2025-12-19-luau-recap-runtime-2025)[Recap: July 2024 Posted July 23, 2024](/news/2024-07-23-luau-recap-july-2024)[Recap: October...
1,351
fecd0cc7be6a9072b53d2fcea199fb19c5ce0ef1b8ad4d27f8788205efe3629d
https://luau.org/syntax
https://luau.org/
2026-10-01T05:58:55.853023Z
# Luau syntax by example Luau uses the baseline [syntax of Lua 5.1](https://www.lua.org/manual/5.1/manual.html#2). For detailed documentation, please refer to the Lua manual, this is an example: ```luau local function tree_insert(tree, x) local lower, equal, greater = split(tree.root, x) if not equal then ...
3,716
7ff7ea0b3909817f0656e365eaa29e61c734d229053de3d4b8c66bf15bc1fcbb
https://luau.org/types/type-functions
https://luau.org/
2026-10-01T05:58:55.896477Z
# Type Functions Type functions are functions that run during analysis time and operate on types, instead of runtime values. They can use the [types](../../types-library) library to transform existing types or create new ones. Here’s a simplified implementation of the builtin type function `keyof`. It takes a table t...
364
88d84679e351a90774ff47d25e0c58fbdd3f7af929540abc3da836caf4fdedae
https://luau.org/types/type-refinements
https://luau.org/
2026-10-01T05:58:55.908974Z
# Type Refinements When we check the type of any lvalue (a global, a local, or a property), what we’re doing is we’re refining the type, hence “type refinement.” The support for this is arbitrarily complex, so go at it! Here are all the ways you can refine: 1. Truthy test: `if x then` will refine `x` to be truthy. 2...
659
97a389fe1728cc7816072a67401a92b536b2528cfadb4aae239cbeb2f7306c88
https://luau.org/types
https://luau.org/
2026-10-01T05:58:55.930108Z
# An introduction to Luau types Luau supports a gradual type system through the use of type annotations and type inference. These types are used to provide warnings, errors, and suggestions for our developers. Type checking helps you find bugs early - while you’re writing code - rather than discovering when your progr...
1,327
c44951788f294ee5c94dc45623df322993c60363e7332410f7c87c3054723afc
https://luau.org/brand
https://luau.org/
2026-10-01T05:58:55.939076Z
# Brand Guidelines We want developers to build tools, libraries, runtimes, integrations, and other projects for (or with) Luau, to be able to clearly describe those projects as working with Luau. At the same time, people should be able to easily distinguish projects that are part of Luau itself from independent projec...
923
09a216c8712db555603e374cb687b8d7be7aa61e0bd4bd5f888df82dacec5248
https://luau.org/getting-started
https://luau.org/
2026-10-01T05:58:55.950838Z
# An introduction to Luau Luau is a fast, small, safe, gradually typed embeddable scripting language derived from Lua 5.1. Luau ships as a command line tool for running, analyzing, and linting your Luau scripts, and is also integrated with Roblox Studio. Roblox developers should also visit our [Creator Docs Luau Secti...
1,180
b65b891a8f4db5575336190e096e0125275ed494396ec2404760d6a40379f4b8
https://luau.org/compatibility
https://luau.org/
2026-10-01T05:58:55.981072Z
# Compatibility with Lua Luau is based on Lua 5.1, and as such incorporates all features of 5.1, except for ones that had to be taken out due to sandboxing limitations. Because of backwards compatibility constraints, we don’t remove features deprecated by later versions (e.g. we still support `getfenv`/`setfenv`). Lat...
3,107
d71079653a304dc761c629db20069e1761080a49974ef4cbd8112690a0e8bdf2
https://luau.org/news/2025-12-19-luau-recap-runtime-2025
https://luau.org/
2026-10-01T05:58:56.303743Z
# Luau Recap for 2025: Runtime December 19, 2025 Hello everyone! It has been a while since the last recap and we wanted to go over changes we have made in Luau since the last update. Because of the amount of time that passed, in this part of the recap, we are going to focus on the runtime changes: new library funct...
2,921
a557f6410224cfe4b14728498bb2dca478b8b2fee021430b7af364da395e87ad
https://luau.org/news/2024-07-23-luau-recap-july-2024
https://luau.org/
2026-10-01T05:58:56.340864Z
# Recap: July 2024 July 23, 2024 Hello everyone! While the Luau team is actively working on a big rewrite of the type inference and type checking engines (more news about that in the near future), we wanted to go over other changes and updates since our last recap back in October. ## Official Luau mascot Luau has ...
2,306
5fe93274612d2c848e3ed049dceeabb640146b28307db80d1255773b55de04e5
https://luau.org/news/2022-11-30-luau-recap-november-2022
https://luau.org/
2026-10-01T05:58:56.380363Z
# Recap: November 2022 November 30, 2022 While the team is busy to bring some bigger things in the future, we have made some small improvements this month. ## Analysis improvements We have improved tagged union type refinements to only include unhandled type cases in the `else` branch of the `if` statement: ```lua...
730
7a1e276982bc239c3fe8b3a956bf9b1400facf4007912004dd1f56d5b812c231
https://luau.org/news/2023-02-02-luau-string-interpolation
https://luau.org/
2026-10-01T05:58:56.391748Z
# String Interpolation February 2, 2023 String interpolation is the new syntax introduced to Luau that allows you to create a string literal with expressions inside of that string literal. In short, it’s a safer and more ergonomic alternative over `string.format`. Here’s a quick example of a string interpolation: ...
287
c83881998adf23967da1887ede790bb4da9c0d1272deffbbcd9d3b34b39c84e0
https://luau.org/news/2023-03-31-luau-recap-march-2023
https://luau.org/
2026-10-01T05:58:56.404333Z
# Recap: March 2023 March 31, 2023 How the time flies! The team has been busy since the last November Recap:working on some large updates that are coming in the future, but before those arrive, we have some improvements that you can already use! ## Improved type refinements Type refinements handle constraints place...
1,446
8202df5b61b85b10cccd9d4a24042ff8dbf256348e4dd4b58c398a4f04388178
https://luau.org/news/2023-11-01-luau-recap-october-2023
https://luau.org/
2026-10-01T05:58:56.421712Z
# Recap: October 2023 November 1, 2023 We’re still quite busy working on some big type checking updates that we hope to talk about soon, but we have a few equally exciting updates to share in the meantime! Let’s dive in! ## Floor Division Luau now has a floor division operator. It is spelled `//`: ```luau local a...
2,016
ebdd1ff40abd0ae3c6f239bf77c4f294b2cbab9515b7acaf338f4a1565c15231
https://luau.org/news/2022-11-04-luau-origins-and-evolution
https://luau.org/
2026-10-01T05:58:56.445448Z
# Luau origins and evolution November 4, 2022 At the heart of Roblox technology lies [Luau](https://luau-lang.org), a scripting language derived from Lua 5.1 that is being [developed](https://github.com/Roblox/luau) by an internal team of programming language experts with the help of open source contributors. It pow...
4,388
be0e933564c0d8b0f8d9a7a7da499caf79ee686463c84304ea26489ccd0501a8
https://luau.org/news/2023-07-28-luau-recap-july-2023
https://luau.org/
2026-10-01T05:58:56.446692Z
# Recap: July 2023 July 28, 2023 Our team is still spending a lot of time working on upcoming replacement for our type inference engine as well as working on native code generation to improve runtime performance. However, we also worked on unrelated improvements during this time that are summarized here. ## Analysi...
764
4abb04125d1464476722d3aa5d4aa4adb0428a561a2ba1b89f41b02c7eeef5f7
https://luau.org/news/2022-11-01-luau-recap-september-october-2022
https://luau.org/
2026-10-01T05:58:56.761339Z
# Recap: September & October 2022 November 1, 2022 ## Semantic subtyping One of the most important goals for Luau is to avoid *false positives*, that is cases where Script Analysis reports a type error, but in fact the code is correct. This is very frustrating, especially for beginners. Spending time chasing down a ...
665
d76c0b2733e316e2eee83795328dd5e15e150b7e947bcf56e3da55645740f824
https://luau.org/news/2022-10-31-luau-semantic-subtyping
https://luau.org/
2026-10-01T05:58:56.788274Z
# Semantic Subtyping in Luau October 31, 2022 Luau is the first programming language to put the power of semantic subtyping in the hands of millions of creators. ## Minimizing false positives One of the issues with type error reporting in tools like the Script Analysis widget in Roblox Studio is *false positives*. ...
4,556
265cb1aeb7d8ffbef502b30b36f3771589fa8f4c3e9e0986f1c8cd15903848dd
https://luau.org/news/2022-03-31-luau-recap-march-2022
https://luau.org/
2026-10-01T05:58:56.890292Z
# Recap: March 2022 March 31, 2022 ## Singleton types We added support for singleton types! These allow you to use string or boolean literals in types. These types are only inhabited by the literal, for example if a variable `x` has type `"foo"`, then `x == "foo"` is guaranteed to be true. Singleton types are parti...
778
94fd436e2c993f2aa0f37607c3a28dfeeec1fcb1c47da1be0887c1d248eb9efa
https://luau.org/news/2022-07-07-luau-recap-june-2022
https://luau.org/
2026-10-01T05:58:56.897571Z
# Recap: June 2022 July 7, 2022 # Lower bounds calculation A common problem that Luau has is that it primarily works by inspecting expressions in your program and narrowing the *upper bounds* of the values that can inhabit particular variables. In other words, each time we see a variable used, we eliminate possible ...
867
cdcd0669913eacf574f0f5d2011261e8a645c933c857a61dbb5983eaee11b307
https://luau.org/news/2022-06-01-luau-recap-may-2022
https://luau.org/
2026-10-01T05:58:56.910889Z
# Recap: May 2022 June 1, 2022 This month Luau team has worked to bring you a new language feature together with more typechecking improvements and bugfixes! ## Generalized iteration We have extended the semantics of standard Lua syntax for iterating through containers, `for vars in values` with support for general...
954
bd39f92a76ce03a0f9c58ac4549a88ca9f9ef96a89e1f2991a8ac0c781da3935
https://luau.org/news/2022-02-28-luau-recap-february-2022
https://luau.org/
2026-10-01T05:58:56.926438Z
# Recap: February 2022 February 28, 2022 ## Default type alias type parameters We have introduced a syntax to provide default type arguments inside the type alias type parameter list. It is now possible to have type functions where the instantiation can omit some type arguments. You can provide concrete types: ``...
1,194
841296d52cb543fa7e822f18f47a40b70f55acdf9b36f3c66c96269f0b9e31fa
https://luau.org/news/2022-05-02-luau-recap-april-2022
https://luau.org/
2026-10-01T05:58:56.937115Z
# Recap: April 2022 May 2, 2022 It’s been a bit of a quiet month. We mostly have small optimizations and bugfixes for you. It is now allowed to define functions on sealed tables that have string indexers. These functions will be typechecked against the indexer type. For example, the following is now valid: ```luau ...
395
2d8e1b90729cc5c040d9c74402b6ad8f2bb50e915edb0387f790b61798850c4c
https://luau.org/news/2022-08-29-luau-recap-august-2022
https://luau.org/
2026-10-01T05:58:56.956583Z
# Recap: July & August 2022 August 29, 2022 [Cross-posted to the [Roblox Developer Forum](https://devforum.roblox.com/t/luau-recap-july-august-2022/).] ## Tables now support `__len` metamethod See the RFC [Support `__len` metamethod for tables and `rawlen` function](https://github.com/Roblox/luau/blob/master/rfcs/l...
2,340
3ca6c97ca0e2d9f033aa46bcb79ace9ce1c54fb09dac7462a8849b532e13c0be
https://luau.org/news/2022-01-27-luau-recap-january-2022
https://luau.org/
2026-10-01T05:58:57.184610Z
# Recap: January 2022 January 27, 2022 ## Performance improvements The implementation of `tostring` has been rewritten. This change replaces the default number->string conversion with a new algorithm called Schubfach, which allows us to produce the shortest precise round-trippable representation of any input number ...
1,083
529752d241c54c5643f649db3fe0875d9bcc78d321db2112b1d31c3eac370b71
https://luau.org/news/2021-11-29-luau-recap-november-2021
https://luau.org/
2026-10-01T05:58:57.247107Z
# Recap: November 2021 November 29, 2021 ## Type packs in type aliases Type packs are the construct Luau uses to represent a sequence of types. We’ve had syntax for generic type packs for a while now, and it sees use in generic functions, but it hasn’t been available in type aliases. That has changed, and it is now ...
1,145
aae67945226e169a38bc6046d986fbc82f84d1f130816ebbd50babf1d4ff205d
https://luau.org/news/2021-09-30-luau-recap-september-2021
https://luau.org/
2026-10-01T05:58:57.356555Z
# Recap: September 2021 September 30, 2021 ## Generic functions The big news this month is that generic functions are back! Luau has always supported type inference for generic functions, for example: ```luau type Point<X,Y> = { x: X, y: Y } function swap(p) return { x = p.y, y = p.x } end local p : Point<number...
1,363
42a09cac85440fb5c28a02ec41abdf475bf4f0370cfb4cd4b1a55c8249a1f23d
https://luau.org/news/2021-10-31-luau-recap-october-2021
https://luau.org/
2026-10-01T05:58:57.373595Z
# Recap: October 2021 October 31, 2021 ## `if-then-else` expression In addition to supporting standard if *statements*, Luau adds support for if *expressions*. Syntactically, `if-then-else` expressions look very similar to if statements. However instead of conditionally executing blocks of code, if expressions condi...
1,457
a6d9785364d56101fc95bb062e1b1861e8a1bb255df4f76a100742fcb42a3d24
https://luau.org/news/2021-06-30-luau-recap-june-2021
https://luau.org/
2026-10-01T05:58:57.386152Z
# Recap: June 2021 June 30, 2021 Most of our team was busy working on improving Luau interaction with Roblox Studio for an upcoming feature this month, but we were able to add typechecking and performance improvements as well! ## Constraint Resolver To improve type inference under conditional expressions and other ...
779
8cf8575da69100b723e7820f101e981fb2414b595fd83883f7da9d712b99c532
https://luau.org/news/2021-08-31-luau-recap-august-2021
https://luau.org/
2026-10-01T05:58:57.408035Z
# Recap: August 2021 August 31, 2021 ## Editor features The Roblox Studio [Luau-Powered Autocomplete & Language Features Beta](https://devforum.roblox.com/t/script-editor-luau-powered-autocomplete-language-features-beta) that our team has been working on has finally been released! Be sure to check that out and leave...
1,064
69c5cd10ad5de420febb1f9a03d35230f57ac1683bd7df307d4399bb0526c779
https://luau.org/news/2021-07-30-luau-recap-july-2021
https://luau.org/
2026-10-01T05:58:57.415552Z
# Recap: July 2021 July 30, 2021 Our team was still busy working on upcoming Studio Beta feature for script editor, but we did fit in multiple typechecking improvements. ## Typechecking improvements A common complaint that we’ve received was a false-positive error when table with an optional or union element type i...
1,083
8d59084b305e529bd44a26c11f5b4f8391e19f521670cb50eb08bb7ab9df6575
https://luau.org/news/2021-11-03-luau-goes-open-source
https://luau.org/
2026-10-01T05:58:57.416500Z
# Luau Goes Open-Source November 3, 2021 When Roblox was created 15 years ago, we chose Lua as the scripting language. Lua was small, fast, easy to embed and learn and opened up enormous possibilities for our developers. A lot in Roblox was built on Lua including hundreds of thousands of lines of internally-develope...
438
a238a373f8372d7ae19a28562e143958a421b975a2d671a8ca66d893a2dcb90d
https://luau.org/news/2021-05-31-luau-recap-may-2021
https://luau.org/
2026-10-01T05:58:57.585710Z
# Recap: May 2021 May 31, 2021 This month we have added a new small feature to the language and spent a lot of time improving our typechecker. ## Named function type arguments We’ve updated Luau syntax to support optional names of arguments inside function types. The syntax follows the same format as regular functi...
662
2bc74c67ce498890d99337aef61ce2af98af721dff03d67c2ef572c0f8ddd9fd
https://luau.org/news/2021-04-30-luau-recap-april-2021
https://luau.org/
2026-10-01T05:58:57.763395Z
# Recap: April 2021 April 30, 2021 Another busy month in Luau with many performance improvements. ## Editor features Luau implementation now provides an internal API for type-aware autocomplete suggestions. Roblox Studio will be the first user of this API and we plan for a new beta feature to come soon in addition...
539
e08fe640abda8680e50feb4440549001bbd1b86d5c703dfa2080ea6ac5b25e5c
https://luau.org/news/2021-03-29-luau-recap-march-2021
https://luau.org/
2026-10-01T05:58:57.794966Z
# Recap: March 2021 March 29, 2021 It’s been a busy month in Luau! ## Typed variadics Luau supports *variadic* functions, meaning ones which can take a variable number of arguments (varargs!) but previously there was no way to specify their type. Now you can! ```luau function f(x: string, ...: number) print(x) ...
972
d9c8eb3a9313759dcd999863882386bf59ef7d9656a85f701fb5456f0fed5370
https://luau.org/news/2021-03-01-luau-recap-february-2021
https://luau.org/
2026-10-01T05:58:57.814182Z
# Recap: February 2021 March 1, 2021 It’s been a busy few months in Luau! ## Infallible parser Traditional compilers have focused on tasks that can be performed on complete programs, such as type-checking, static analysis and code generation. This is all good, but most programs under development are incomplete! The...
1,106
dee956aa3d67c61ecf450db270051606ee5cc50d204a3f4ad84744b10f8af9f5
https://luau.org/news/2020-11-19-luau-type-checking-release
https://luau.org/
2026-10-01T05:58:57.824585Z
# Luau Type Checking Release November 19, 2020 10 months ago, we’ve started upon the journey of helping Roblox programmers write robust code by introducing [an early beta of type checking](https://devforum.roblox.com/t/luau-type-checking-release). We’ve received a lot of enthusiastic feedback and worked with the comm...
1,818
f89acd3c6e5296b063b8fcb5c8e479f45db2fa1c8b9858e83ff3e3e214ad2d7d
https://luau.org/news/2020-06-20-luau-recap-june-2020
https://luau.org/
2026-10-01T05:58:57.855847Z
# Recap: June 2020 June 20, 2020 … otherwise known as “This Month in Luau” I guess? You know the drill by now. We’ll talk about exciting things that happened to Luau - our new language stack. anxiously glances at FIB3 thread that casts a huge shadow on this announcement, but hopefully somebody will read this Many p...
2,823
df2d05b4d6554a6662ac97bb98109da497cbcec29918d318c00fd2b77095b95c
https://luau.org/news/2020-08-11-luau-recap-august-2020
https://luau.org/
2026-10-01T05:58:57.876126Z
# Recap: August 2020 August 11, 2020 Let’s talk about changes, big and small, that happened since June! Many people work on these improvements, with the team slowly growing - thanks @Apakovtac, @EthicalRobot, @fun\_enthusiast, @mrow\_pizza and @zeuxcg! ## Type annotations are safe to use in production! When we sta...
1,691
784fe3ca08ddb990b318f8e2e808b2e4561e69f48a5319664b6f4f16b799c353
https://luau.org/news/2020-10-30-luau-recap-october-2020
https://luau.org/
2026-10-01T05:58:57.892962Z
# Recap: October 2020 October 30, 2020 We’ve been so busy working on the current projects that we didn’t do an update in September, so let’s look at changes that happened since August! Many people work on these improvements, with the team slowly growing - thanks @Apakovtac, @EthicalRobot, @fun\_enthusiast, @machinam...
2,083
f0a72105c6d589b1f0d7c49729b562981fdfee4ac719c5ad508f7809c2d9c4f7
https://luau.org/news/2020-05-18-luau-recap-may-2020
https://luau.org/
2026-10-01T05:58:58.005837Z
# Recap: May 2020 May 18, 2020 Luau (lowercase u, “l-wow”) is an umbrella initiative to improve our language stack - the syntax, compiler, virtual machine, builtin Lua libraries, type checker, linter (known as Script Analysis in Studio), and more related components. We continuously develop the language and runtime to...
2,146
9b1f991245857b735f8ce68f4642700fcdc4cf9748cb576b5d80fa0286638009
https://luau.org/news/2020-02-25-luau-recap-february-2020
https://luau.org/
2026-10-01T05:58:58.252205Z
# Recap: February 2020 February 25, 2020 We continue to iterate on our language stack, working on many features for type checking, performance, and quality of life. Some of them come with announcements, some come with release notes, and some just ship - here we will talk about all things that happened since November ...
1,725
d04779c0904bd80ed5d7498ca4f4859665e3b52da7c5f5b8a8cc362e581f4628
https://luau.org/news/2019-11-11-luau-recap-november-2019
https://luau.org/
2026-10-01T05:58:58.264252Z
# Recap: November 2019 November 11, 2019 A few months ago, we’ve released our new Lua implementation, Luau ([Faster Lua VM Released](https://devforum.roblox.com/t/faster-lua-vm-released/339587)) and made it the default for most platforms and configurations. Since then we’ve shipped many smaller changes that improved ...
1,763
a8e1573c8542e0b1771681e0b68232097809022eceda6de0f0326e985900fb64
https://luau.org/news/2020-01-16-luau-type-checking-beta
https://luau.org/
2026-10-01T05:58:58.277012Z
# Luau Type Checking Beta January 16, 2020 Hello! We’ve been quietly working on building a type checker for Lua for quite some time now. It is now far enough along that we’d really like to hear what you think about it. I am very happy to offer a beta test into the second half of the Luau effort. ## Beta Test Firs...
1,177
2383dc48fe56af14e50b683b93716f1ecaad675d217a45a4718c70923b30582f
https://luau.org/why
https://luau.org/
2026-10-01T05:58:58.288060Z
# Why Luau? Around 2006, [Roblox](https://www.roblox.com) started using Lua 5.1 as a scripting language for games. Over the years the runtime had to be tweaked to provide a safe, secure sandboxed environment; we gradually started accumulating small library changes and tweaks. Over the course of the last few years, in...
623
1d14bbed5f68407204afbf60624d9944e4e27fbb549f14b7d7df9280e5a39658
https://luau.org/lint
https://luau.org/
2026-10-01T05:58:58.359242Z
# Luau Lints Luau comes with a set of linting passes, that help make sure that the code is correct and consistent. Unlike the type checker, that models the behavior of the code thoroughly and points toward type mismatches that are likely to result in runtime errors, the linter is more opinionated and produces warnings...
4,124
46708943ca58b3fd92ed2e706fb504a3dd5c26256bcae6b6f0a8f4456a5df38f
https://luau.org/sandbox
https://luau.org/
2026-10-01T05:58:58.411388Z
# Embedding a sandboxed Luau virtual machine Luau is safe to embed. Broadly speaking, this means that even in the face of untrusted (and in Roblox’s case, actively malicious) code, the language and the standard library don’t allow unsafe access to the underlying system, and don’t have known bugs that allow escaping ou...
1,773
23dbf188db958d0d804abc60e0215abe20c257cae0c4ea4774c1be45613af093
https://luau.org/performance
https://luau.org/
2026-10-01T05:58:58.433671Z
# How we make Luau fast One of the main goals of Luau is to enable high performance code, with gameplay code being the main use case. This can be viewed as two separate goals: * Make idiomatic code that wasn’t tuned faster * Enable even higher performance through careful tuning Both of these goals are important - it...
6,382
4151c9eb3e5095e3a8ec2a087d99f68b31286f822903bf8a29295d5c85237fef
https://luau.org/guides/profile
https://luau.org/
2026-10-01T05:58:58.474220Z
# Profiling your Luau code One of the main goals of Luau is to enable high performance code. To help with that goal, we are relentlessly optimizing the compiler and runtime - but ultimately, performance of their code is in developers’ hands, and is a combination of good algorithm design and implementation that adheres...
1,142
80667616ba3896c04ae5e4b08884cac5b66e40d7f0b295d0b1fd5a9b30a34a1d
https://luau.org/types/basic-types
https://luau.org/
2026-10-01T05:58:58.714968Z
# Primitives and Simple Types ## Builtin types The Luau VM supports 10 primitive types: 1. `nil` 2. `string` 3. `number` 4. `boolean` 5. `table` 6. `function` 7. `thread` 8. `userdata` 9. `vector` 10. `buffer` Most of these can be specified by their name and written directly in type annotations: ```luau local mess...
1,838
b11f84a2826ff188fdf783ab30eec60eae150558e50f69e96bc612d4c02864b7
https://luau.org/types/unions-and-intersections
https://luau.org/
2026-10-01T05:58:58.739489Z
# Union and Intersection Types ## Union types A union type represents *one of* the types in this set. If you try to pass a union onto another thing that expects a *more specific* type, it will fail. For example, what if this `string | number` was passed into something that expects `number`, but the passed in value w...
796
7cc5125091aa16799633400934b6fea560b97352fbd1cb2d4f6383701402f9b7
https://luau.org/types/generics
https://luau.org/
2026-10-01T05:58:58.764150Z
# Generics and Polymorphism The type inference engine was built from the ground up to recognize generics. A generic is simply a type parameter in which another type could be slotted in. It’s extremely useful because it allows the type inference engine to remember what the type actually is, unlike `any`. ```luau type ...
908
5e8d91e77c0873bbafa2ae6837b095abd63e91cc0399b8e82c41c1957afe6961
https://luau.org/types/tables
https://luau.org/
2026-10-01T05:58:58.782184Z
# Table Types From the type checker perspective, each table can be in one of three states. They are: `unsealed table`, `sealed table`, and `generic table`. This is intended to represent how the table’s type is allowed to change. ### Unsealed tables An unsealed table is a table which supports adding new properties, w...
845
fc1d2c9c33929b23a58451cfd84fc36678a41bdc4ff48a461f8849fb0139cf77
https://luau.org/types/object-oriented-programs
https://luau.org/
2026-10-01T05:58:58.829748Z
# Object-Oriented Programming ## Adding types for faux object oriented programs One common pattern we see with existing Lua/Luau code is the following object-oriented code. While Luau is capable of inferring a decent chunk of this code, it cannot pin down the types of `self` when it spans multiple methods. ```luau l...
901
893c3b9a05b995098aed322b1520c78aeb6ad0065e992cb8a59eb39d402f4ba0
https://luau.org/types/roblox-types
https://luau.org/
2026-10-01T05:58:58.842169Z
# Foreign Types from the Embedder Roblox supports a rich set of classes and data types, [documented here](https://developer.roblox.com/en-us/api-reference). All of them are readily available for the type checker to use by their name (e.g. `Part` or `RaycastResult`). When one type inherits from another type, the type ...
296
9d25db7034041c32ae043d5ccd6263f2b994e9fbc2bd7a31fcd0bd550634760e
https://luau.org/types/considerations
https://luau.org/
2026-10-01T05:58:58.875578Z
# Additional Considerations ## Module interactions Let’s say that we have two modules, `Foo` and `Bar`. Luau will try to resolve the paths if it can find any `require` in any scripts. In this case, when you say `./bar`, Luau will resolve it as: relative to this script, go to my sibling script named Bar. ```luau -- f...
275
8342c64775364855f28bf1ed07420ecb66e45be7ebcb7f39afd7b30bb2c3f914
https://luau.org/library
https://luau.org/
2026-10-01T05:58:59.041480Z
# Standard Library Luau comes equipped with a standard library of functions designed to manipulate the built-in data types. Note that the library is relatively minimal and doesn’t expose ways for scripts to interact with the host environment - it’s expected that embedding applications provide extra functionality on to...
11,499
e54397bfeef7f8580f3d5653a15ec7eb0400ae37162ebd5f5388a38e159ddc73
https://rfcs.luau.org/vector-library.html
https://luau.org/
2026-10-01T05:58:59.043765Z
# Vector library **Status**: Implemented ## Summary Implement a standard library that provides functionality for the vector type. ## Motivation Currently, vectors are a primitive type implemented internally. All of the heavy work to implement vectors is done, but there is no runtime-agnostic way to use vectors in ...
1,532
51c0be4fde76737eceeeb2a5e387b6476a49c2ccc143721a4acad4a5805ed614
https://rfcs.luau.org/function-math-map.html
https://luau.org/
2026-10-01T05:58:59.128483Z
# math.map **Status**: Implemented ## Summary Add a `map` function to the `math` library, which maps a number from one range to another. ## Motivation Numerical mapping is a very common operation within game development. With only a brief search of the CoreScript source on the Roblox Client Tracker, there are abou...
531
5256bcb3c5b53566a2aa632a3b7a88f9b9be6961f3c08bd9c554dbac6e94383e
https://rfcs.luau.org/math-isnan-isfinite-isinf.html
https://luau.org/
2026-10-01T05:58:59.144318Z
# math.isnan, math.isinf and math.isfinite for Math Library **Status**: Implemented ## Summary This RFC proposes a `math.isnan`, a `math.isinf`, and a `math.isfinite` function to be added to the math library. These functions will validate that numbers are not NaN and are “finite” (non-NaN non-inf valid numbers) resp...
768
e6ce608f21228419989a1982456829910fc75d1b0f4c1a34a33b5daa05a31be0
https://rfcs.luau.org/function-buffer-bits.html
https://luau.org/
2026-10-01T05:58:59.155109Z
# buffer.readbits/writebits **Status**: Implemented ## Summary Add `buffer.readbits` and `buffer.writebits` to give developers an easy way to work with bit buffers. ## Motivation With the release of the buffer type, many developers have asked for a way to write integers of custom non-standard widths and just gener...
611
790b2b05c6cc6ddd55c5166100bb1268501d1e8713d3a8a6e1ae00865f72285a
https://rfcs.luau.org/function-math-lerp.html
https://luau.org/
2026-10-01T05:58:59.178352Z
# math.lerp **Status**: Implemented ## Summary Add a `lerp` function to the `math` library, which performs linear interpolation between two numbers. ## Motivation Linear interpolation is a very common operation in game development. It is present in standard libraries of some general purpose languages (C++, C#, Zig...
2,243
f568ade3b2e3f945c07864f3a70ea2b5af9a0953ebe43ef4444af6b9aed8f40d
https://luau.org/types-library
https://luau.org/
2026-10-01T05:58:59.246173Z
# Type Function Library The `types` library is used to create and transform types, and can only be used within [type functions](../types/type-functions). ### `types` library properties ``` types.any ``` The [any](../types/basic-types#any-type) `type`. ``` types.unknown ``` The [unknown](../types/basic-types#unkno...
2,489
2cb1631249f0c2cd49db17dafd379e29d0844a37a98da23856f072a4ceb419a3
https://luau.org/grammar
https://luau.org/
2026-10-01T05:58:59.301012Z
# Syntax Grammar This is the complete syntax grammar for Luau in EBNF. More information about the terminal nodes STRING and NUMBER is available in the [syntax section](../syntax). ``` chunk ::= block block ::= {stat [';']} [laststat [';']] stat ::= varlist '=' explist | var compoundop exp | functioncall |...
1,203
267ccf636d48f10839796ce7869f976c0ebaf50f6fbf973d08b37dcea1b6d71e
https://luau.org/attributes
https://luau.org/
2026-10-01T05:58:59.322294Z
# Attributes Luau supports a set of built-in attributes that can be applied to function declarations to adjust the behavior of the compiler, type analysis, or runtime. This page documents all available attributes and their parameters. Attributes are not user-definable. For an overview of attribute syntax, see the [sy...
729
6bc2e954a820450ad4dae632a7dfd48f85654a9b8087758715d91b9a13f1513e
https://rfcs.luau.org/shared-self-types.html
https://luau.org/
2026-10-01T05:58:59.385765Z
# Shared self types ## Summary This RFC proposes sharing `self` types between method definitions which share a metatable. ## Motivation Currently, metamethods are type-inferred independently, and so give completely separate types to `self`. This has poor ergonomics, as type errors for inconsistent methods are produ...
2,859
0e8288cd4d29881593c569d8f80cffcdbed68fc5061eb4f9ed918c2fb9ae8f5b
https://luau.org/api
https://luau.org/
2026-10-01T05:58:59.791937Z
# C API The Luau Virtual Machine exposes a C API that allows embedders to manipulate it and execute Luau code. It is declared through the [`VM/include`](https://github.com/luau-lang/luau/tree/master/VM/include) header files: * `lua.h` - Primary VM APIs, members use either the `lua_` or `luau_` prefix * `lualib.h` - H...
21,943
ef6559040de8ca165c49c7315ea04094c51e8ca46d39aff3beaf407fac0325bb
https://luau.org/typecheck
https://luau.org/
2026-10-01T05:58:59.863101Z
[Redirecting from `/typecheck/` to `/types`](/types)
16
47c1b7c37aca94e9c0412ff4211efeef6c21b6fce43b6d9246f28a0cb60b6638