xopoiii/blinkblox

An IDL compiler written in Luau for ROBLOX buffer networking, with hardened inbound handling

BlinkBlox logo

BlinkBlox

An IDL compiler for Roblox buffer networking whose generated server is safe to point at the open internet.

License Release Docs

Documentation · Quick start · Changelog

You describe your events and functions, and what they carry, in a .blink schema. The compiler generates a server module and a client module in plain Luau. They pack every call into one buffer per frame, check everything a client sends before your code sees it, and keep working when a client is hostile.

event Damage {
	From: Client,
	Type: Reliable,
	Call: SingleSync,
	Rate: 10,
	Data: struct { Target: Instance(Humanoid), Amount: u8(1..100) }
}
-- Server: the listener runs only after the rate limit has passed and Amount is 1..100.
Net.Damage.On(function(Player, Hit)
	Combat.Apply(Player, Hit.Target, Hit.Amount)
end)

-- Client
Net.Damage.Fire({ Target = Humanoid, Amount = 25 })
A Roblox builder feeding bricks into a machine that turns them into streams of data

Why BlinkBlox

  • Bounded inbound traffic. Packet size, the number of events in a packet and the number of instance references are capped before anything is parsed. Each player also gets a byte budget.
  • Rate limits per player and per event. Set Rate and Burst on an event, or a default for the whole schema. Refused events go to a handler you provide, and nobody is kicked automatically.
  • Hostile input costs the attacker, not the server. Every length is checked before the read and the allocation it pays for. A malformed event drops only itself.
  • Mismatched builds refuse each other. A client and a server built from different schemas stop at startup instead of decoding one event as another.
  • Small on the wire. Booleans and optional flags share a bitfield, and boolean[] packs eight to a byte. A length is sent relative to its range, and CFrame<quat> fits a rotation in 7 bytes. An unreliable event that cannot fit is refused at compile time.
  • Tooling. The CLI has watch mode and @profile builds that keep debug remotes out of release. You also get TypeScript definitions and a Studio plugin with live diagnostics.

Performance

Each tool fires 1000 events a frame from client to server. The run was in Studio, on BlinkBlox 0.29.0, and the numbers are median frame rate and bandwidth.

PayloadRoblox remotesBlinkBloxzapByteNet
1000 booleans15 FPS57 FPS, 3.19 Kbps37 FPS, 8.53 Kbps22 FPS, 8.33 Kbps
100 entities16 FPS60 FPS*, 41.57 Kbps42 FPS, 41.86 Kbps24 FPS, 41.71 Kbps

* Studio caps the frame rate at 60. The methodology and the full percentiles are in Benchmarks and benchmark/Benchmarks.md.

Where it comes from

BlinkBlox is a maintained fork of Blink. Upstream froze this line of the compiler and began a rewrite. It left reported defects open, including an unbounded parse of a hostile client buffer. This fork fixes them and continues from v0.18.8. See Migrating from Blink.

Install

rokit add XopoIII/BlinkBlox blinkblox             # CLI through Rokit
pesde add xopoiii/blinkblox --dev --target lune   # or through pesde

Binaries for every platform, and the Studio plugin (blinkblox-plugin.rbxm), are attached to each release. The plugin is also on the Creator Store as BlinkBlox Editor. See Installation.

Contributing

rokit install              # toolchain
sh scripts/run-tests.sh    # test suite
cd docs && npm install && npm run dev   # documentation site

CLAUDE.md describes the architecture and the gates that CI and the git hooks run.

A Roblox character holding up a pile of bricks against a flood of data

Credits

Originally written by Axen. This fork continues from v0.18.8 and remains MIT licensed.