knafeh 1.1.0

QUIC-based RPC library with Python bindings
Documentation
mod client;
mod codec;
mod server;
mod service;
mod types;

use pyo3::prelude::*;

/// The native Python module `knafeh._native`.
///
/// All async methods return native Python awaitables via
/// `pyo3_async_runtimes::tokio::future_into_py`. Python `await`
/// drives the tokio runtime directly — no background threads or
/// channel marshalling needed.
#[pymodule]
fn _native(m: &Bound<'_, PyModule>) -> PyResult<()> {
    // Server.
    m.add_class::<server::PyRpcServer>()?;

    // Client.
    m.add_class::<client::PyRpcClient>()?;
    m.add_class::<client::PyStreamReceiver>()?;
    m.add_class::<client::PySyncStreamReceiver>()?;

    // Service / handler.
    m.add_class::<service::PyServiceHandler>()?;

    // Codec.
    m.add_class::<codec::PyCodec>()?;

    // TLS config.
    m.add_class::<types::PyTlsConfig>()?;

    Ok(())
}