nushell/crates/nu-plugin/src
Devyn Cairns f2169c8022
Switch plugin msgpack protocol to named format (#12580)
# Description
In conflict with the documentation, the msgpack serializer for plugins
is actually using the compact format, which doesn't name struct fields,
and is instead dependent on their ordering, rendering them as tuples.
This is not a good idea for a robust protocol even if it makes the
serialization and deserialization faster.

I expect this to have some impact on performance, but I think the
robustness is probably worth it.

Deserialization always accepts either format, so this shouldn't cause
too many incompatibilities.

# User-Facing Changes
This does technically change the protocol, but it makes it reflect the
documentation. It shouldn't break deserialization, so plugins shouldn't
necessarily need a recompile.

Performance is likely worse and I should benchmark the difference.

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`
2024-04-19 07:50:51 -05:00
..
plugin Add an example Nushell plugin written in Nushell itself (#12574) 2024-04-19 09:53:30 +03:00
protocol Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
serializers Switch plugin msgpack protocol to named format (#12580) 2024-04-19 07:50:51 -05:00
util Local socket mode and foreground terminal control for plugins (#12448) 2024-04-15 18:28:18 +00:00
lib.rs Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
sequence.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00