Forest Logo
search
package_2

luaukit

By @hinikaa

Roblox

Mirrored

luaukit

Eight small, focused Luau/Roblox utility modules in one Wally-installable package -- the primitives you'd otherwise stitch together from five different authors' repos, tested, with one consistent style.

Overview

Roblox game dev has no shortage of frameworks (Fusion for UI, Knit for server/client architecture), but no small, coherent utility layer sits between them -- the stuff every project ends up needing regardless of which framework it's built on: cleanup, custom events, easing, a state machine, a promise, a DataStore wrapper that doesn't silently drop writes, a real networking layer, a way to benchmark any of it. luaukit is that layer: eight modules, each independently require-able, each already used and tested on its own before being brought in here.

Nothing here is new code written for this package -- every module already existed as its own repo, already had a test suite, and is just getting packaged and documented properly for the first time.

Modules

ModuleWhat it does
TroveCleanup/janitor for connections, instances, and callbacks -- the pattern usually called a "Maid" in the Roblox community.
SignalAn RBXScriptSignal-like event primitive. Roblox's built-in signals can't be constructed outside the engine; this is a drop-in stand-in with the same Connect/Once/Wait/Fire/Disconnect interface.
SpringCritically-damped spring value for smooth UI/animation, using the closed-form solution to the spring-damper ODE (the same approach behind Unity's SmoothDamp).
StateMachineA small finite state machine with guards and transitions, declarative config.
PromiseA minimal Promise: resolve/reject, andThen/catch/finally, Promise.all.
DataStoreDataStore wrapper with retry/backoff and session locking, so a flaky write doesn't silently lose player data.
NetA networking layer over RemoteEvent/RemoteFunction: middleware pipeline, token-bucket rate limiter, request/response, and a buffered event for high-frequency traffic.
BenchMicrobenchmark harness: warmup, then run for a minimum duration (or fixed iteration count), reporting ns/op. Uses os.clock(), not a Roblox-only timer, so it works standalone too.

Install

Not on the Wally registry yet. Add as a Git dependency, or copy src/ directly into your project — each module is self-contained, so you don't need the others to use one.

Usage

local luaukit = require(path.to.luaukit)

local trove = luaukit.Trove.new()
local signal = luaukit.Signal.new()

Or require a single module directly, without pulling in the rest:

local Trove = require(path.to.luaukit.Trove.Trove)

Example

local luaukit = require(path.to.luaukit)

local trove = luaukit.Trove.new()
local onDamage = luaukit.Signal.new()

trove:Add(onDamage:Connect(function(amount)
	print("took", amount, "damage")
end))

onDamage:Fire(10)
trove:Clean() -- disconnects onDamage automatically

Testing

Each module ships its own test.lua, runnable standalone with a plain Lua 5.1 interpreter (no Roblox required) from inside that module's folder:

cd src/Trove && lua5.1 test.lua

DataStore and Net's tests only cover their engine-independent pieces (RetryPolicy, Middleware, RateLimiter) -- the parts that touch DataStoreService/Instance.new can only be exercised inside Roblox Studio.

Notes

  • Each module was built and tested independently before being packaged here -- this repo is packaging and documentation, not new engineering.
  • No cross-module dependencies except DataStore -> RetryPolicy and Net -> Middleware/RateLimiter, both internal to their own module.
  • MIT licensed.

License

MIT, see LICENSE.

Package Details

Install command (Click to copy)


Version

0.1.0

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.