A Haxe library for fast binary serialization and network synchronization with automatic change tracking and RPCs.
HxBit is a Haxe library for binary serialization and network synchronization, designed to efficiently serialize object graphs and replicate state changes across networked clients. It solves the problem of building multiplayer or distributed applications by providing automatic change tracking, remote procedure calls, and versioning support.
Haxe developers building networked applications such as multiplayer games, real-time collaborative tools, or any system requiring efficient state synchronization between clients and a server.
Developers choose HxBit for its performance—using macros for fast, typed serialization—and its integrated approach to networking, which combines serialization, synchronization, and RPCs into a cohesive library with features like change filtering and versioning.
Haxe Binary serialization and network synchronization library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses macros to generate strictly typed serialization code, making it significantly faster than Haxe's runtime type-checking serializer, as noted in the README comparison.
Automatically replicates object state changes across clients and server when enableReplication is set, with built-in change tracking to reduce boilerplate for multiplayer applications.
Supports multiple RPC modes (all, clients, server, owner, checked) with helper functions for validation, enabling precise control over network calls and conditional execution with @:do blocks.
Serializes schema data to handle version differences by ignoring removed fields or adding defaults for new ones, which is essential for long-lived applications like games with save files.
Networking features require implementing a custom NetworkHost class, as shown in the Heaps example, adding initial setup complexity and potential for errors.
Changes to mutable structures like arrays or maps trigger sending the entire content over the network, rather than incremental updates, which can waste bandwidth for large datasets.
The macro-based serialization generates additional code, leading to larger binary sizes compared to simpler serialization methods, as mentioned in the README.