This repository is a set of helper functions for working with Native Messaging protocol, which is a way for webextension to exchange messages with native applications.
Read more about native messaging here: * https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging * https://developer.chrome.com/extensions/nativeMessaging
Simple echo application:
```rust
extern crate webextensionrusttemplate as protocol; use std::io::Write; use std::process;
fn main() { loop { let message = match protocol::readstdin() { Ok(m) => m, Err() => process::exit(1), }; printlnstderr!("received {}", message); protocol::writestdout(message); } } ```