V2265WPBM2LBE4BGEFB3HYCZXA5C5MJKQ5IVPFWY3ARCVIAYBZGQC FVAECMP3SBASNUQGUTHGZTMXLLAGW2FK6MID7P6YP5LRD7ZHADYAC CTPHEJ2S7MMSZTNVO4LFEYHMMTKYWB5PC54RMVJHMATN5TY45GPQC PTQ26KY65NDVZ35EG66SARWRGGYKDJ2BT3EVK4RJFS2J5AQUX6OQC LSPMIVEH5IYUPBMB7DL5VTM2HOMYDBA5ZY3GIW6ZFTCDGTUUDFFAC B66IOHMWFZINTWC57Q5OD4YPBVQNBN3YUM3ZKX4MTDKHYGH5JHFAC 576YRB7XSKS6Q265TEJQS7HUGMKSGHGDRGVP6WBZS7XMK6RVJRNQC AFZQUL4VKEEDRSA5CV6YXN7PMX6PQ2PMLECTG53S4HZKTNCAIMXQC X6QJYZJZSS7YSRCDOPQ2I2Y7U7VJA4HE5P74ZYENROR7FRUPPXWQC CVXA6LIYFYIZEVPTI335A332EXRVJXF2SC4B5F2NFYXZXYVDFBKQC HKVKPIIWK6AB4DWCS6SB47RYEXTD4QAQIGDFNQGA3TDJEIAXBZKQC DZSYKTTKQ6DUGPMCPS7FQRSE5FO4FEHY2L3UWB73A7Y7Y6GDHWCAC enum KakouneMessage {/// Resize screen to .0 x .1 charactersResizeScreen(u32, u32),}async fn kakoune_thread_main(messages: smol::channel::Receiver<KakouneMessage>,event_loop_proxy: EventLoopProxy<AppMessage>,) {let mut child = smol::process::Command::new("kak").args(["-ui", "json", "src/main.rs"]).stdout(Stdio::piped()).stdin(Stdio::piped()).spawn().expect("Failed to run kakoune");let mut stdout = BufReader::new(child.stdout.take().expect("Failed to get stdout"));let mut stdin = child.stdin.take().expect("Failed to get stdin");
let kakoune_loop = async {loop {let mut out = String::new();if stdout.read_line(&mut out).await.is_err() {break;}let content: Rpc<json_ui::Request> = serde_json::from_str(&out).unwrap();match content.inner {json_ui::Request::Draw(lines, default_face, padding_face) => {event_loop_proxy.send_event(AppMessage::Draw(lines, default_face, padding_face)).unwrap();}json_ui::Request::DrawStatus(_atoms, _atoms1, _face) => {}json_ui::Request::MenuShow(_items, _coord, _face, _face1, _menu_show_style) => {}json_ui::Request::MenuSelect(_) => {}json_ui::Request::MenuHide() => {}json_ui::Request::InfoShow(_, _, _coord, _face, _info_show_style) => {}json_ui::Request::InfoHide(_) => {}json_ui::Request::SetCursor(_set_cursor_mode, _coord) => {}json_ui::Request::SetUiOptions(_) => {}json_ui::Request::Refresh(_) => {}};}};let message_loop = async {loop {let message = messages.recv().await.unwrap();match message {KakouneMessage::ResizeScreen(columns, rows) => {let resp =serde_json::to_vec(&Rpc::from(json_ui::Response::Resize(rows, columns))).unwrap();stdin.write(&resp).await.unwrap();}}}};kakoune_loop.race(message_loop).await;}
][[package]]name = "async-channel"version = "2.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"dependencies = ["concurrent-queue","event-listener-strategy","futures-core","pin-project-lite",][[package]]name = "async-executor"version = "1.13.3"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8"dependencies = ["async-task","concurrent-queue","fastrand","futures-lite","pin-project-lite","slab",][[package]]name = "async-fs"version = "2.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8034a681df4aed8b8edbd7fbe472401ecf009251c8b40556b304567052e294c5"dependencies = ["async-lock","blocking","futures-lite",][[package]]name = "async-io"version = "2.6.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"dependencies = ["autocfg","cfg-if","concurrent-queue","futures-io","futures-lite","parking","polling","rustix 1.1.2","slab","windows-sys 0.61.2",][[package]]name = "async-lock"version = "3.4.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc"dependencies = ["event-listener","event-listener-strategy","pin-project-lite",
[[package]]name = "async-net"version = "2.0.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7"dependencies = ["async-io","blocking","futures-lite",][[package]]name = "async-process"version = "2.5.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"dependencies = ["async-channel","async-io","async-lock","async-signal","async-task","blocking","cfg-if","event-listener","futures-lite","rustix 1.1.2",][[package]]name = "async-signal"version = "0.2.13"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c"dependencies = ["async-io","async-lock","atomic-waker","cfg-if","futures-core","futures-io","rustix 1.1.2","signal-hook-registry","slab","windows-sys 0.61.2",][[package]]name = "async-task"version = "4.7.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
name = "blocking"version = "1.6.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"dependencies = ["async-channel","async-task","futures-io","futures-lite","piper",][[package]]
name = "event-listener-strategy"version = "0.5.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"dependencies = ["event-listener","pin-project-lite",][[package]]name = "fastrand"version = "2.3.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"[[package]]
[[package]]name = "futures-core"version = "0.3.31"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"[[package]]name = "futures-io"version = "0.3.31"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
name = "futures-lite"version = "2.6.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"dependencies = ["fastrand","futures-core","futures-io","parking","pin-project-lite",][[package]]
][[package]]name = "smol"version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a33bd3e260892199c3ccfc487c88b2da2265080acb316cd920da72fdfd7c599f"dependencies = ["async-channel","async-executor","async-fs","async-io","async-lock","async-net","async-process","blocking","futures-lite",