ruddle/pocs/split_bins/split_bins_plugin/src/main.rs

18 lines
510 B
Rust
Raw Normal View History

2022-08-20 16:51:07 +02:00
fn main() {
println!("Hello, split_bins_plugin!");
let args = std::env::args();
let exe_name = args.last().expect("could not get last item");
let (tx, rx) = ipc_channel::ipc::channel::<String>().expect("could not open channel");
let tx0 = ipc_channel::ipc::IpcSender::connect(exe_name.to_string())
.expect("could not connect to server");
tx0.send(tx).expect("could not send tx");
let msg = rx.recv().expect("could not receive message");
println!("msg: {}", msg)
}