A library to make native messaging even easier than it already is.
Typically you'd use this in a loop, reading a message in and writing a message out until there are none left to read. Perhaps something like this:
# extern crate webext;
#
# extern crate serde_derive;
#
Serde
I strongly recommend that you use this with serde_derive
so that you can
use your own structs for input and output. Alternatively, you can use the
Json
type, but that's a lot more annoying to deal with. My favorite enum
attributes are #[serde(tag = "type", rename_all = "snake_case")]
.