| Crates.io | orchard-rs |
| lib.rs | orchard-rs |
| version | 2025.12.2 |
| created_at | 2025-12-27 21:35:26.317412+00 |
| updated_at | 2025-12-27 21:35:26.317412+00 |
| description | Rust client for Orchard - high-performance LLM inference on Apple Silicon |
| homepage | |
| repository | https://github.com/TheProxyCompany/orchard-rs |
| max_upload_size | |
| id | 2007868 |
| size | 53,278 |
Rust client for Orchard - high-performance LLM inference on Apple Silicon.
[dependencies]
orchard-rs = "2025.12"
use orchard::{IPCClient, RequestOptions};
#[tokio::main]
async fn main() -> Result<(), orchard::Error> {
// Connect to PIE (Proxy Inference Engine)
let mut client = IPCClient::new();
client.connect()?;
// Send inference request
let request_id = client.next_request_id();
let mut stream = client.send_request(
request_id,
"qwen-2.5-coder-32b",
"/path/to/model",
"Explain quantum computing in simple terms.",
RequestOptions {
max_tokens: 500,
temperature: 0.7,
..Default::default()
},
)?;
// Stream response tokens
while let Some(delta) = stream.recv().await {
if let Some(content) = delta.content {
print!("{}", content);
}
if delta.is_final_delta {
println!();
break;
}
}
client.disconnect();
Ok(())
}
Apache-2.0