Committing for reference

This commit is contained in:
2025-01-12 02:02:01 +01:00
parent 52c8d1c95a
commit e0d246fe1f
17 changed files with 826 additions and 168 deletions

View File

@@ -7,8 +7,10 @@ edition = "2021"
[dependencies]
ahash = "0.8.11"
async-std = "1.13.0"
derive_destructure = "1.0.0"
dyn-clone = "1.0.17"
futures = "0.3.31"
hashbrown = "0.15.2"
itertools = "0.14.0"
konst = "0.3.16"

View File

@@ -81,6 +81,11 @@ pub fn extension_main(data: ExtensionData) {
}
}
pub struct ExtensionOwner {
rn: ReqNot<api::ExtMsgSet>,
onmessage: Mutex<OnMessage>,
}
fn extension_main_logic(data: ExtensionData) {
let api::HostHeader { log_strategy } = api::HostHeader::decode(&mut std::io::stdin().lock());
let mut buf = Vec::new();

View File

@@ -1,6 +1,9 @@
use std::io;
use std::pin::pin;
use async_std::io;
use orchid_base::msg::{recv_msg, send_msg};
pub fn send_parent_msg(msg: &[u8]) -> io::Result<()> { send_msg(&mut io::stdout().lock(), msg) }
pub fn recv_parent_msg() -> io::Result<Vec<u8>> { recv_msg(&mut io::stdin().lock()) }
pub async fn send_parent_msg(msg: &[u8]) -> io::Result<()> {
send_msg(pin!(io::stdout()), msg).await
}
pub async fn recv_parent_msg() -> io::Result<Vec<u8>> { recv_msg(pin!(io::stdin())).await }