zentiph/luautils

A Luau utilities library; an extension of Luau's standard library

luautils

A Luau utilities library written for a wide variety of general use cases. Luautils strives to act as an extension of Luau's standard library.

This library is heavily inspired by standard libraries of other languages such as Rust and Java.

Contents

SublibraryContains
CoreOption, Result, Errors, and shared types
TimeDuration
TablesdeepCopy
Asyncretry

Collections, Math, Strings, Validation, Events, and Roblox are planned and currently empty.

Installation

As of now, there is no clean way to install the library other than to clone the repository or download it manually. This library will eventually be added to Wally, but for now, the best way to install is to clone the repository:

git clone https://github.com/Zentiph/luautils.git

Using it in ROBLOX

Build the library into a model file with Rojo, then insert it into your place:

rojo build -o luautils.rbxm

Or sync it live into ROBLOX Studio, where it appears as the ReplicatedStorage/Luautils ModuleScript:

rojo serve dev.project.json

Then require it:

local Luautils = require(game:GetService("ReplicatedStorage").Luautils)
local Option = Luautils.Core.Option

Verifying your copy

The tools used by this project are pinned in rokit.toml. To install them and run every check (formatting, linting, type checking, and tests), run the following from the repository root:

rokit install
lute setup
lute run .lute/ci.luau

Documentation

The API documentation is hosted on GitHub Pages at zentiph.github.io/luautils, and is rebuilt from master on every push that passes CI.

It is written as Moonwave doc comments in the source. To preview it locally:

moonwave dev

Contributing

See CONTRIBUTING.md for development setup, the CI checks, and the conventions used throughout the library.