add MessagePack as a plugin protocol (#6370)

This commit is contained in:
Darren Schroeder
2022-08-21 06:13:38 -05:00
committed by GitHub
parent 56ce10347e
commit 5337a6dffa
12 changed files with 444 additions and 23 deletions

View File

@ -1,4 +1,4 @@
use nu_plugin::{serve_plugin, CapnpSerializer};
use nu_plugin::{serve_plugin, MsgPackSerializer};
use nu_plugin_example::Example;
fn main() {
@ -6,7 +6,7 @@ fn main() {
// used to encode and decode the messages. The available options are
// CapnpSerializer and JsonSerializer. Both are defined in the serializer
// folder in nu-plugin.
serve_plugin(&mut Example {}, CapnpSerializer {})
serve_plugin(&mut Example {}, MsgPackSerializer {})
// Note
// When creating plugins in other languages one needs to consider how a plugin