docs(developers): add documentation for MessagePack #503
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive documentation for the MessagePack integration in FiveM, detailing its features, reserved types, and usage in Lua and JavaScript runtimes. The C# section is marked as TODO to allow future contributions.
This documentation complements citizenfx/fivem#2931, which globally exposes the MessagePack codec (msgpack_pack and msgpack_unpack) to enhance cross-runtime data serialization and deserialization.
Key Updates:
MessagePack Overview:
Reserved Extension Types:
A table of FiveM-specific types, such as Vector2, Vector3, and others.
Lua API:
JavaScript API:
Example Scenarios:
Real-world cases of cross-runtime data handling (Lua to JavaScript, JavaScript to C#, and C# to Lua).
Reason for the Update:
This documentation supports the recent enhancement from citizenfx/fivem#2931, ensuring developers can effectively utilize the MessagePack codec for optimized data handling across all FiveM-supported runtimes.
Preview:
The document is located at content/docs/scripting-reference/msgpack.md.
Feedback Requested: