msgpack-ruby icon indicating copy to clipboard operation
msgpack-ruby copied to clipboard

[PROTOTYPE] Add optimized_struct option for fast Struct serialization

Open gmalette opened this issue 1 month ago • 0 comments

This is a prototype, please don't actually merge this as I cannot write C code and this is all Claude-generated.

The idea is to add a C-level fast path for serializing and deserializing Ruby Struct types, bypassing Ruby proc callbacks entirely.

  factory.register_type(0x01, MyStruct, optimized_struct: true)

The wire format is identical to the recursive proc-based approach.

gmalette avatar Dec 11 '25 19:12 gmalette