Expand description
Library for attaching asdf-overlay to a process and initiating IPC channel.
By utilizing this library, you can render overlay from any process and control it via IPC. It’s designed to give you maximum flexibility as you can keep most of the logic in this process.
§Example
use std::path::Path;
use std::time::Duration;
use asdf_overlay_client::{inject, OverlayDll};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let dll = OverlayDll {
x64: Some(Path::new("asdf-overlay-x64.dll")),
x86: Some(Path::new("asdf-overlay-x86.dll")),
x86: Some(Path::new("asdf-overlay-arm64.dll")),
};
let (mut conn, mut events) = inject(
1234, // target process pid
dll, // overlay dll paths
Some(Duration::from_secs(10)), // timeout for injection and ipc connection
).await?;
// Use `conn` to send requests to overlay, and `events` to receive events from the overlay.
Ok(())
}Re-exports§
pub use asdf_overlay_common as common;pub use asdf_overlay_event as event;
Modules§
- client
- Client side IPC connection and event stream implementation.
- surface
- Client side overlay surface management wrapper.
- ty
- Various types used in the
crate::surfacemodule.
Structs§
- Overlay
Dll - Paths to overlay DLLs for different architectures.
Functions§
- inject
- Inject overlay DLL into target process and create IPC connection.