18 lines
510 B
Rust
18 lines
510 B
Rust
|
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)
|
||
|
}
|