/endec.dart

Primary LanguageDartMIT LicenseMIT

endec

endec is a format-agnostic serialization framework inspired by Rust's serde library and the Codec API from Mojang's DataFixerUpper.

This repository contains the in-progress reference implementation, written in Dart. For a more-complete implementation without guarantees, see this repository's sister project on the Wisp Forest organization (written in Java).

Repository Structure

This repository actually contains 7 separate dart packages. The root directory contains the core endec package which defines the API and contains some base implementations. The nested packages are as follows:

  • endec_tests: Test suites for all other packages
  • endec_builder: A build system builder for automatically generating struct endecs
  • endec_binary: An (as of currently) unspecified binary format, good for networking
  • endec_edm: The endec data model types and format implementation
  • endec_json: Support for the JSON format
  • endec_nbt: An implementation of Minecraft's Named Binary Tag format, with binary and string encoding

Documentation

For the time being, documentation can be found in the owo section of the Wisp Forest docs. The linked document adequately explains the basics but is out-of-date and does not agree with this reference implementation in a number of places - it will be updated to match in the future

Acknowledgements

The excellent serde documentation and enjarai's Codec guide on the Fabric Docs have been invaluable during development. Further, Blodhgarm is responsible for developing significant parts of the Java implementation