nushell/crates/nu-plugin
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
..
src Switch plugin msgpack protocol to named format (#12580) 2024-04-19 07:50:51 -05:00
Cargo.toml Bump rmp-serde from 1.1.2 to 1.2.0 (#12547) 2024-04-17 16:44:54 +08:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00
README.md Add test support crate for plugin developers (#12259) 2024-03-23 13:29:54 -05:00

nu-plugin

This crate provides the API for Nushell plugins. See the book for more information on how to get started.