forked from Orchid/orchid
Committing for reference
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user