{"id":"hinikaa/luaukit","name":"luaukit","scope":"hinikaa","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"9f9d609808b5a9bb0670e1235a06daed0a88533680fe2a2093440a6fbe94ab0d","likes":0,"downloads":0,"install":"forest install hinikaa/luaukit","url":"https://forest.dev/p/roblox/hinikaa/luaukit","files":"https://api.forest.dev/ai/package/roblox/hinikaa/luaukit/files","readme":"# luaukit\n\nEight small, focused Luau/Roblox utility modules in one Wally-installable\npackage -- the primitives you'd otherwise stitch together from five\ndifferent authors' repos, tested, with one consistent style.\n\n## Overview\n\nRoblox game dev has no shortage of frameworks (Fusion for UI, Knit for\nserver/client architecture), but no small, coherent *utility* layer sits\nbetween them -- the stuff every project ends up needing regardless of which\nframework it's built on: cleanup, custom events, easing, a state machine, a\npromise, a DataStore wrapper that doesn't silently drop writes, a real\nnetworking layer, a way to benchmark any of it. `luaukit` is that layer:\neight modules, each independently `require`-able, each already used and\ntested on its own before being brought in here.\n\nNothing here is new code written for this package -- every module already\nexisted as its own repo, already had a test suite, and is just getting\npackaged and documented properly for the first time.\n\n## Modules\n\n| Module | What it does |\n|---|---|\n| `Trove` | Cleanup/janitor for connections, instances, and callbacks -- the pattern usually called a \"Maid\" in the Roblox community. |\n| `Signal` | An `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. |\n| `Spring` | Critically-damped spring value for smooth UI/animation, using the closed-form solution to the spring-damper ODE (the same approach behind Unity's `SmoothDamp`). |\n| `StateMachine` | A small finite state machine with guards and transitions, declarative config. |\n| `Promise` | A minimal Promise: `resolve`/`reject`, `andThen`/`catch`/`finally`, `Promise.all`. |\n| `DataStore` | DataStore wrapper with retry/backoff and session locking, so a flaky write doesn't silently lose player data. |\n| `Net` | A networking layer over `RemoteEvent`/`RemoteFunction`: middleware pipeline, token-bucket rate limiter, request/response, and a buffered event for high-frequency traffic. |\n| `Bench` | Microbenchmark 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. |\n\n## Install\n\nNot on the Wally registry yet. Add as a Git dependency, or copy `src/`\ndirectly into your project — each module is self-contained, so you don't\nneed the others to use one.\n\n## Usage\n\n```lua\nlocal luaukit = require(path.to.luaukit)\n\nlocal trove = luaukit.Trove.new()\nlocal signal = luaukit.Signal.new()\n```\n\nOr require a single module directly, without pulling in the rest:\n\n```lua\nlocal Trove = require(path.to.luaukit.Trove.Trove)\n```\n\n## Example\n\n```lua\nlocal luaukit = require(path.to.luaukit)\n\nlocal trove = luaukit.Trove.new()\nlocal onDamage = luaukit.Signal.new()\n\ntrove:Add(onDamage:Connect(function(amount)\n\tprint(\"took\", amount, \"damage\")\nend))\n\nonDamage:Fire(10)\ntrove:Clean() -- disconnects onDamage automatically\n```\n\n## Testing\n\nEach module ships its own `test.lua`, runnable standalone with a plain Lua\n5.1 interpreter (no Roblox required) from inside that module's folder:\n\n```sh\ncd src/Trove && lua5.1 test.lua\n```\n\n`DataStore` and `Net`'s tests only cover their engine-independent pieces\n(`RetryPolicy`, `Middleware`, `RateLimiter`) -- the parts that touch\n`DataStoreService`/`Instance.new` can only be exercised inside Roblox\nStudio.\n\n## Notes\n\n- Each module was built and tested independently before being packaged\n  here -- this repo is packaging and documentation, not new engineering.\n- No cross-module dependencies except `DataStore` -> `RetryPolicy` and\n  `Net` -> `Middleware`/`RateLimiter`, both internal to their own module.\n- MIT licensed.\n\n## License\n\nMIT, see [LICENSE](LICENSE).\n","readmeTruncated":false}