xopoiii/blinkblox
An IDL compiler written in Luau for ROBLOX buffer networking, with hardened inbound handling
BlinkBlox
An IDL compiler for Roblox buffer networking whose generated server is safe to point at the open internet.
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 })
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
RateandBurston 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, andCFrame<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
@profilebuilds 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.
| Payload | Roblox remotes | BlinkBlox | zap | ByteNet |
|---|---|---|---|---|
| 1000 booleans | 15 FPS | 57 FPS, 3.19 Kbps | 37 FPS, 8.53 Kbps | 22 FPS, 8.33 Kbps |
| 100 entities | 16 FPS | 60 FPS*, 41.57 Kbps | 42 FPS, 41.86 Kbps | 24 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.
Credits
Originally written by Axen. This fork continues from v0.18.8 and remains MIT licensed.
- Zap, for the range and array syntax.
- ArvidSilverlock, for the float16 implementation.
- The Studio plugin's autocomplete icons come from Microsoft, under the CC BY 4.0 license.
- Speed icons created by alkhalifi design - Flaticon