#[macro_use(println_stderr)] extern crate webextension_protocol as protocol; use std::io::Write; use std::process; fn main() { loop { let message = match protocol::read_stdin() { Ok(m) => m, Err(_) => process::exit(1), }; println_stderr!("received {}", message); protocol::write_stdout(message); } }