Skip to content
pealz1Public

About

Typed, buffer-packed and hard-to-abuse networking for Roblox, compiled from a schema.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation


Cheeto is a compiler for Roblox networking. You describe your events, functions and state in a small schema language, and Cheeto generates the Luau modules that send and receive them: buffer-packed, fully typed on both sides, and guarded by validation, rate limits and your own policies before your code ever runs.

option ClientOutput = "Network/Client.luau"
option ServerOutput = "Network/Server.luau"

struct Hit {
    Target: Instance(Player),
    Damage: u16(0..500)
}

event DealDamage {
    From: Client,
    Type: Reliable,
    Call: SingleAsync,
    Policy: "damage",
    CooldownSeconds: 0.25,
    Data: Hit
}
-- Server
local Network = require(ReplicatedStorage.Network.Server)

Network.Security.RegisterPolicy("damage", function(context)
    return context.Source.Character ~= nil, "no-character"
end)

Network.DealDamage.On(function(player, hit)
    Combat.Apply(player, hit.Target, hit.Damage)
end)
-- Client
local Network = require(ReplicatedStorage.Network.Client)

Network.DealDamage.Fire({ Target = target, Damage = 25 })

Checking Damage against 0..500, enforcing the cooldown, running the policy and rejecting malformed packets all happen in generated code. Anything that does not match the schema is dropped before it reaches yours.

Features

Fast by construction

  • Every field is written at its declared width. Integers are varint-encoded, booleans bit-pack, and reliable and unreliable events are batched into one remote call per recipient per frame.
  • 30+ Roblox datatypes with purpose-built encodings, including CFrame, Color3, UDim2, NumberSequence, Font and EnumItem.
  • Latest and Sequenced delivery for high-frequency state, reliable fragmentation and priority-based shedding.
  • --benchmark measures the bytes, encode and decode time of every endpoint in your schema.

Typed end to end

  • Generated Luau types for the client and the server, with full autocomplete.
  • TypeScript definitions for roblox-ts projects, covering every endpoint and the runtime API, checked with tsc --strict.
  • Structs, enums, tagged enums, maps, sets, optionals, generics and imports.

Hard to abuse

  • Size caps, decode budgets and payload canonicalization drop malformed data before a listener runs.
  • Per-event policies, auth rules, rate limits, cooldowns and idempotency, all failing closed when a rule is missing.
  • Constraints the runtime enforces: distance, ownership, team, zone, match, character state, handles and server-issued ids.
  • Honeypot endpoints, kill switches, replay protection, and a schema-fingerprint handshake that stops decoding mismatched clients.
  • Dropped calls and predictions are answered with the reason, so Invoke never hangs on a rejection.
  • SecurityPreset = Maximum adds a client shield, integrity challenges, server-side movement checks, rotating remote names and decoy remotes.

Built for production

  • --doctor, --strict and --hardening-checklist catch unsafe configuration before release.
  • cheeto.lock keeps endpoint ids stable across edits and turns every wire change into a reviewed diff.
  • Packet capture and replay, metrics and an inspector.
  • State channels with delta replication, and client prediction with server acknowledgement.

Fits your workflow

  • A single binary for Windows, macOS and Linux, a pesde package, and a Roblox Studio plugin.
  • Watch mode recompiles whenever a schema or one of its imports changes.

Installation

With Rokit (recommended):

rokit add pealz1/cheeto

With pesde:

pesde add --dev pealz1/cheeto

Or download a binary or the Studio plugin from the latest release.

Usage

cheeto network            # compile network.cheeto
cheeto network --watch    # recompile on every change
cheeto network --doctor   # validate without writing files
cheeto network --ci --yes # run every report and lockfile check

cheeto --help lists every option. The command line reference covers every flag.

Security model

No networking library can hide data from the client that receives it, and Cheeto does not pretend to. Instead it keeps authority on the server: every client request is checked against the schema, your policies and its rate limits before a handler runs, and every drop is reported through Security.OnViolation with a typed reason you can act on.

Read the security model and the limitations, and SECURITY.md to report a vulnerability.

Documentation

Installation Every way to install the compiler and the plugin
Quick start Your first schema in five minutes
Reference Every option, field, type and generated function
Security model Policies, honeypots, rate limits and the optional client checks
Production checklist What to check before a schema goes live
Limitations What Cheeto does not do, and where its checks stop
Comparison How Cheeto relates to Zap

Repository layout

src/         the compiler: lexer, parser, generator and CLI
plugin/      the Roblox Studio plugin
extras/      optional standalone security detectors
test/        the test suite and schema fixtures
benchmark/   the in-Studio benchmark harness
docs/        the documentation site

Contributing

Contributions are welcome. Read CONTRIBUTING.md to get set up, and follow the code of conduct. In short:

rokit install
cd test && lune run Test --ci

Contributors

pealz1
pealz1

Maintainer
1Axen
1Axen

Original compiler
ArvidSilverlock
ArvidSilverlock

float16 encoding

Want to see your name here? Pick up an issue and open a pull request.

Acknowledgements

License

Cheeto is released under the MIT License.

About

Typed, buffer-packed and hard-to-abuse networking for Roblox, compiled from a schema.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages