Skip to content

eolib v0.1.0-beta.2

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 Sep 08:38
· 18 commits to master since this release

Added

  • EoWriter::ToByteArray() && overload, which moves the data out of the writer instead of copying it.
  • EoReader::View, which creates a reader over data owned by the caller without copying it.
  • operator<< for Serializable (and therefore every generated struct and packet) and for generated enums, which writes the ToString() representation to a std::ostream.

Changed

  • DataEncrypter and StringEncoder functions now transform data in place instead of returning a copy. Each function has (std::uint8_t*, std::size_t), std::vector<std::uint8_t>& and std::string& overloads. StringEncoder::EncodeInPlace/DecodeInPlace are replaced by the EncodeString/DecodeString pointer overloads.
  • Generated structs and packets are now final.
  • Functions that cannot throw are now noexcept, including the Serializable::ByteSize, Packet::Family, Packet::Action and SequenceStart::Value virtual functions. Implementations of these interfaces must also be noexcept.
  • eolib-protocol-gen now rejects protocol files where a non-delimited array without a length is followed by another element in the same chunk, as required by eo-protocol/docs/elements.md.
  • Documented the numeric type policy: all EO numbers are int, values above INT_MAX wrap to negative numbers, and malformed data can decode to negative values.
  • Complete documentation for the public API: every hand-written and generated function now documents its parameters, return value and exceptions, and generated switch data members include the XML comment of the <switch> element.

Fixed

  • eolib-protocol-gen no longer dereferences an empty value (crashing on musl) when a <length> field is referenced by an unnamed hardcoded field; it reports the "Hardcoded fields must not reference a length field" error instead.
  • docs/getting-started.md incorrectly listed generated byte fields as std::uint8_t; they are int.
  • Using a moved-from EoReader no longer dereferences a null pointer; it now behaves like a reader over empty data.
  • DataEncrypter documentation: the order of the encryption and decryption steps was incorrect.
  • Removed documentation links to encryption.md and sequence.md, which do not exist in eo-protocol.
  • ServerVerifier::Hash documentation: challenges should be no larger than 11,092,110, not EoNumericLimits::ThreeMax, since larger values may produce negative hashes.