You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(readme): update version compatibility and Zig 0.16 support notes
- add comprehensive version compatibility table for Zig
- document Zig 0.16 standard library changes and compatibility layer
- update README and Chinese README with new version support details
- explain internal compatibility mechanism for different Zig versions
- **`msgpack.Pack`**: The main struct for packing and unpacking MessagePack data. It is initialized with read and write contexts.
153
162
- **`msgpack.Payload`**: A union that represents any MessagePack type. It provides methods for creating and interacting with different data types (e.g., `mapPayload`, `strToPayload`, `mapGet`).
154
163
164
+
## Implementation Notes
165
+
166
+
### Zig 0.16 Compatibility
167
+
168
+
Starting from Zig 0.16, the standard library underwent significant changes to the I/O subsystem. The `std.io.FixedBufferStream` was removed as part of a broader redesign. This library includes a compatibility layer (`src/compat.zig`) that:
169
+
170
+
- Provides a `BufferStream` implementation for Zig 0.16+ that mimics the behavior of the old `FixedBufferStream`
171
+
- Uses conditional compilation to maintain backward compatibility with Zig 0.14 and 0.15
172
+
- Ensures all existing functionality works seamlessly across different Zig versions
173
+
174
+
This means you can use the same API regardless of your Zig version, and the library will handle the differences internally.
175
+
155
176
## Testing
156
177
157
178
To run the unit tests for this library, use the following command:
0 commit comments