Luau Libraries available for use

[Update] January 18, 2024


Hi developers,

Two years ago, we released Luau into Open Source. Since then, we’ve had an incredibly collaborative relationship with the community through Luau RFCs. Together, we’re building the most advanced scripting language in the world! :happy3: :roblox:

The Roblox platform runs on Luau and our hero internal products (Universal App, Studio) are built on it. We were very deliberate in this choice. By using the same language as our community, we progressively improve it, benefitting all.

Today, we’re taking the next step by gradually open sourcing every internal Luau library that we’ve used to build our hero products:

  • These will be released as both a Github repository and a package on the Creator Marketplace. The package will always reflect the latest repository state. We are working on allowing Github links to be included with any asset on the Creator Marketplace. When this is enabled, the package will carry a link back to the repo (and vice versa).
  • Both representations (repo & package) will be licensed permissively under MIT and we welcome the community to use these as you like. What makes you successful makes us successful!
  • We are not accepting contributions at this time. We would like to in the future and are working on a few enablers to make that happen.

We’ve wanted to do this for a while, but as with any large company, open source isn’t free! We’ve thought carefully about balancing risk around security, maintainer commitments, and community code quality. We’re working up the library dependency chain, starting with libraries without dependencies first.

Our first set of libraries includes the following:

Library Description Links Asset Link
cryo A collection of methods for working with immutable data in a functional way for Roblox Lua. GitHub - Roblox/cryo: A collection of methods for working with immutable data in a functional way for Roblox Lua. This is a read-only mirror Cryo - Marketplace
dash A collection of core utilities expanding the capabilities of Lua in Roblox. GitHub - Roblox/dash: A collection of core utilities expanding the capabilities of Lua in Roblox. This is a read-only mirror Dash - Marketplace
luau-regexp A regular expression library for Luau. Adapted from @Blockzez’s library. GitHub - Roblox/luau-regexp: A regular expression library for Luau. This is a read-only mirror Luau-regexp - Marketplace
luau-polyfill A set of utilities to mimic common JS polyfills needed for translating projects from JS to Lua/Luau. GitHub - Roblox/luau-polyfill: A set of utilities to mimic common JS polyfills needed for translating projects from JS to Lua/Luau. This is a read-only mirror Luau-polyfill - Marketplace
luau-tag-utils Utility functions to query Instances from tags attached with CollectionService. GitHub - Roblox/luau-tag-utils: Utility functions to query Instances from tags attached with CollectionService. This is a read-only mirror Luau-tag-utils - Marketplace
picomatch-lua Blazing fast and accurate glob matcher written in Lua. GitHub - Roblox/picomatch-lua: Blazing fast and accurate glob matcher written in Lua. This is a read-only mirror Picomatch-lua - Marketplace
symbol-luau A simple, stable implementation of Symbol in Luau. GitHub - Roblox/symbol-luau: A simple, stable implementation of Symbol in lua. This is a read-only mirror Symbol-luau - Marketplace
signal-lua A well-structured, well-tested, and well-documented Lua signal implementation. GitHub - Roblox/signal-lua: A well-structured, well-tested, and well-documented lua signal implementation. This is a read-only mirror Signal-lua - Marketplace
zen-observable-lua An Implementation of Observables for Lua. GitHub - Roblox/zen-observable-lua: An Implementation of Observables for Lua. This is a read-only mirror Zen-observable-lua - Marketplace
js-to-lua Conversion tool for migrating JS/TS code into Luau. GitHub - Roblox/js-to-lua: Conversion tool for migrating JS/TS code into Luau. This is a read-only mirror N/A
graphql-lua A reference implementation of GraphQL for Roblox Lua. GitHub - Roblox/graphql-lua: A reference implementation of GraphQL for Roblox Lua. This is a read-only mirror GraphQL - Marketplace
graphql-tag-lua A Lua template literal tag that parses GraphQL queries. GitHub - Roblox/graphql-tag-lua: A Lua template literal tag that parses GraphQL queries. This is a read-only mirror GraphQL-tag - Marketplace
react-lua A comprehensive, but not exhaustive, translation of upstream ReactJS 17.x into Roblox Lua. GitHub - Roblox/react-lua: A comprehensive translation of upstream React 17.x into Lua. This is a read-only mirror ReactLua - Marketplace
roact-navigation Roact Navigation provides a declarative navigation system built on top of Roact. GitHub - Roblox/roact-navigation: A declarative navigation system for App UI, built on top of Roact. This is a read-only mirror RoactNavigation - Marketplace
roact-performance-benchmarks Performance benchmarks for Roact GitHub - Roblox/roact-performance-benchmarks: Performance benchmarks for Roact. This a read-only mirror RoactPerformanceBenchmarks - Marketplace
apollo-client Apollo client for Lua GitHub - Roblox/apollo-client-lua: Apollo Client for GraphQL translated to Lua. This is a read-only mirror ApolloClient - Marketplace
otter Declarative animation library for Roblox Lua. GitHub - Roblox/otter: Declarative animation library for Roblox Lua. This is a read-only mirror Otter - Marketplace
jest-roblox Delightful testing for Roblox Lua. GitHub - Roblox/jest-roblox: Delightful testing for Roblox Lua. This is a read-only mirror JestRoblox - Marketplace
react-testing-library-lua Simple and complete testing utilities that encourage good testing practices. GitHub - Roblox/react-testing-library-lua: Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror ReactTestingLibrary - Marketplace
dom-testing-library-lua Simple and complete testing utilities that encourage good testing practices. GitHub - Roblox/dom-testing-library-lua: Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror DOMTestingLibrary - Marketplace
chalk-lua Terminal string styling library for Lua. GitHub - Roblox/chalk-lua: Terminal string styling library for Lua. This is a read-only mirror ChalkLua - Marketplace

Many internal employees and teams have contributed to this and - now that we’ve done the work - we are confident in this path. Huge shoutout to @TheNicell, @tnavarts, @BitwiseAndrea, @Ov_vO2, @Dogekidd2012, @completefacade, @ghost_naps, @MrDoomBringer, and @NightlyShores.

-GeneralRelish

299 Likes

This topic was automatically opened after 11 minutes.

I love this.

By any chance, are there any plans to expose compression functions? It was proposed years ago here but afaik was never actually materialized. I know those probably aren’t written in Lua but I feel like asking here fits the topic.

42 Likes

Thank you so much! I’m going to hijack this post to say that the OSS discord server and community is really excited about these changes! It’s awesome to see Roblox contributing back to the community in this way.

52 Likes

This is fantastic. Not only is it great to see Roblox finally allowing others to use the libraries created internally, but it is being treated like proper open-source projects. I’m excited to see where this goes with “working up the library dependency chain”.

For those not into open-source, it is important to describe why this is important:

  • The source code is freely available. No have to dig through the Roblox files and hope they are present.
  • The commit history (history of what is changed, when it was changed, and a message for why) is provided. Having a commit history and being able to see older versions of files is huge for debugging new problems.
  • We can request direct code changes through pull requests without having to go through feature requests/bug reports. For Roblox, this is free real estate. For us, this means we don’t need to rely on our request/bug report to be prioritized - we can diagnose issues and present changes to be reviewed. New features we want will be integrated faster. Bugs will be resolved faster.

Again, thank you for starting this. I hope Roblox plans to go big with this, such as the CoreScripts.

61 Likes

The best thing now would be for the internal corescripts to be open source, even if that is a little too enthusiastic

28 Likes

awsome to see, lpg would be proud :slight_smile:

14 Likes

Will Rotriever ever be public as well?

12 Likes

Although I am not sure how good this is yet, I anticipate using this in the future.

12 Likes

These are awesome! Are there any plans to publish them to wally as well for ease of installation?

11 Likes

It was discussed, but the answer is not currently. We don’t want to play a hand in influencing what tools the community uses.

25 Likes

To add on to this, these packages are open source, and we aren’t opposed to you to publishing these things to Wally or npm, or the package manager of your choice!

34 Likes

As someone who regularly uses these packages (and their third party alternatives) I’m so so excited for this announcement! Gone are the days of having to sift through previous projects and library folders to get these utils; in are the days of homogenized versioning and easy access all in one place! Woohoo! I love a lot of the changes being made in recent months and I’m very excited to see what else you guys have in store for us.

8 Likes

Woohoo! I am glad this has finally come to fruition, and the community can stop pulling these from client bundles :smile:

A couple of questions:

  • Will more niche packages, such as Apollo Client and the testing libraries, also be included in these releases? Our game, Clip It, would benefit immensely from Apollo, but we are weary of pulling it from client bundles without test cases because of its complex asynchronous logic.
  • Will the JS-to-Lua translation tool also be released? Our team hand-maintains several translated JavaScript packages (Sentry client, React Navigation, and hopefully soon Zustand), and it would be a significant help if we could make use of the tool.

Me and the team would love to discuss our use cases in private if Apollo & JS-to-Lua aren’t on the roadmap. Releasing them would likely save us months of work long-term.

17 Likes

This is amazing! Roblox also has a wide array of internal tooling to enable development at scale while using Luau and the platform and it’d be great to see a future where these are also released to the community.

6 Likes

I absolutely love to finally see progress on this. I am disappointed a bit that React (or Roact) wasn’t included in the initial batch and that these are read-only (no contributing), but I hope to see that change in the future, as it says. I have major support releasing the JS-to-Lua translation tools, as well.

9 Likes

Roact is already open-source (see GitHub - Roblox/roact: A view management library for Roblox Lua similar to React), along with Rodux.

3 Likes

Thanks for open sourcing this stuff! This is a good step forward.

8 Likes

They weren’t lying, that future really is bright.

This is a big jump forward for OSS on Roblox, and it’s a big deal even though Roblox isn’t yet accepting contributions. I cannot wait for what the future holds. Especially given these seem to use Rojo, which is awesome to see.

PS: Uploading these to Wally would be cool. While I know you don’t want to influence what the community uses, in general the OSS community has settled on Wally and these will end up on there one way or another. It would be cool if Roblox themselves were the ones to upload them… Though at the same time I understand not wanting to encourage people to install things from a secondary source that you don’t control despite having your name on it. :slight_smile:

9 Likes

So glad that Cryo is finally open source! While there (technically) was a sort-of open source alternative (Llama), it’s good to know that this library is now completely open source.

5 Likes