Skip to content

AstaWasTaken/NetRay-Compile

Repository files navigation

Vector

NetRay-Compiler [BETA]

IDL compiler for NetRay runtime modules.

Documentation

  • GitHub Pages docs source lives in docs/.
  • See docs/index.md for full usage/reference docs.

Current Frontend Availability

  • Supported: Roblox Studio plugin.
  • Supported: standalone CLI packaged with the Lune runtime.
  • Install plugin: Creator Store.
  • Install CLI with Rokit: rokit add AstaWasTaken/NetRay-Compile@<version> netray

CLI Quick Start

rokit add AstaWasTaken/NetRay-Compile@<version> netray
netray compile path/to/schema.idl --out-dir generated --scope NetRay

Successful CLI output writes:

  • generated/Server.luau
  • generated/Client.luau
  • generated/Types.luau

IDL Syntax Support

  • Legacy NetRay syntax stays supported:
    • event reliable Name(type value, ...);
    • function Name(type arg, ...) -> (type ret, ...);
    • struct Name { type field; ... }
  • Blink-style blocks are supported:
    • event Name { From, Type, Call, Data }
    • function Name { Yield, Data, Return }
    • struct Name { field: type, ... }

Mapping Notes

  • From: Client | Server | Both (default Both).
  • Type: Reliable | Unreliable.
  • Call: SingleSync | ManySync | SingleAsync | ManyAsync | Polling.
  • Data:
    • Data: StructName -> single argument API (Fire(dataTable)).
    • Data: (T1, T2, ...) -> positional API (Fire(v1, v2, ...)).

Wire Compatibility

  • Existing legacy schemas keep the same message-id multiplexing and encode order.
  • Struct payloads are flattened in declared field order using existing primitive/container codecs.
  • Runtime transport architecture remains 3 remotes (Reliable, Unreliable, Function) with arena+cursor batching.
  • Flush now uses order-preserving segmented batching for event queues:
  • Only contiguous runs of the same message ID are compacted, and only when that shrinks bytes.
  • Reliable callback order remains unchanged.

Planned Updates

  • Multi Listeners
  • More supported types
  • FireClient, FireFiltered, FireExcept

Contributing

  • All contributions welcome
  • Open a Pull request or open a issue

Roblox Plugin

Compiler + IDL

  • To Contribute to Compiler and/or IDL check src
  • Ensure it passes VerifyForbidden before submitting Pull Request

About

NetRay Compile - IDL Compiler - v0.1.1

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages