with split bins poc
This commit is contained in:
9
pocs/split_bins/split_bins_plugin/Cargo.toml
Normal file
9
pocs/split_bins/split_bins_plugin/Cargo.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "split_bins_plugin"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
ipc-channel = "0.16.0"
|
17
pocs/split_bins/split_bins_plugin/src/main.rs
Normal file
17
pocs/split_bins/split_bins_plugin/src/main.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user