README
This is the same overview shown on the GitHub repository (opens in a new tab).
A lightweight abstraction layer over ByteNet (opens in a new tab) for Roblox, built to simplify networking inside Kravas.
Group related packets into Namespaces, define Channels with a clean chainable API, and get built-in middleware and reliability controls — without writing raw ByteNet.definePacket boilerplate everywhere.
Installation
Add KravasNet to your wally.toml:
[dependencies]
KravasNet = "brunnogames3776/kravasnet@0.5.0"Then run:
wally installYou can also grab the package directly from wally.run/package/brunnogames3776/kravasnet (opens in a new tab).
Quick Example
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local KravasNet = require(ReplicatedStorage.Packages.KravasNet)
local CombatNet = KravasNet.createNamespace("Combat")
:add("Damage", { amount = KravasNet.float32, target = KravasNet.inst })
:add("Position", { pos = KravasNet.vec3 }, { reliability = "unreliable" })
CombatNet:build() -- registers everything with ByteNet right now
-- Server
CombatNet.Damage:sendTo(player, { amount = 50, target = someCharacter })
-- Client
CombatNet.Position:on(function(data)
print(data.pos)
end)For the full walkthrough, head to Quick Start. For method signatures, see the API Reference.
Features
- Namespaces & Channels — organize related packets under one named container instead of scattering
definePacketcalls across scripts. - Unified Channel API —
sendTo,sendToAll,sendToAllExcept,send,on— context-aware for server and client automatically. - Middleware pipeline — validate, sanitize, or reject incoming packets before your handler runs.
- Reliability options —
reliable/unreliableper channel. - Direct ByteNet access — drop down to
KravasNet.ByteNetwhenever you need something the abstraction doesn't cover.
Requirements
- ByteNet (opens in a new tab)
0.4.x(installed automatically as a dependency via Wally) - Roblox Luau
License
MIT