Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions data-plane/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions data-plane/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ members = [
"examples",
"python/bindings",
"slimrpc-compiler",
"slimrpc-examples/rust",
"testing",
]

Expand Down Expand Up @@ -52,6 +53,7 @@ agntcy-slim-tracing = { path = "core/tracing", version = "0.2.7" }

anyhow = "1.0.98"

async-stream = "0.3"
async-trait = "0.1.88"
aws-lc-rs = "1.13"
base64 = "0.22"
Expand Down
3 changes: 3 additions & 0 deletions data-plane/bindings/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ agntcy-slim-signal = { workspace = true }
agntcy-slim-tracing = { workspace = true }

# External dependencies
async-stream = { workspace = true }
async-trait = { workspace = true }
display-error-chain = { workspace = true }
futures = { workspace = true }
futures-timer = { workspace = true }
Expand All @@ -30,6 +32,7 @@ serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }
uniffi = { version = "0.28.3", features = ["cli"] }

Expand Down
13 changes: 13 additions & 0 deletions data-plane/bindings/rust/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,19 @@ impl App {
}
}

// Non-UniFFI methods for internal use (slimrpc)
impl App {
/// Get reference to internal app for advanced use cases (slimrpc)
pub fn inner_app(&self) -> &Arc<SlimApp<AuthProvider, AuthVerifier>> {
&self.app
}

/// Get notification receiver for server use (slimrpc)
pub fn notification_receiver(&self) -> Arc<RwLock<mpsc::Receiver<Result<Notification, SlimSessionError>>>> {
self.notification_rx.clone()
}
}

// ============================================================================
// Internal methods for PyO3 bindings (not exported through UniFFI)
// ============================================================================
Expand Down
10 changes: 10 additions & 0 deletions data-plane/bindings/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ mod server_config;
mod service;
mod session;

pub mod slimrpc;

// Public re-exports
pub use app::{App, SessionWithCompletion};
pub use build_info::{BuildInfo, get_build_info, get_version};
Expand Down Expand Up @@ -97,5 +99,13 @@ pub use service::{
};
pub use session::{Session, SessionConfig, SessionType};

// SLIMRpc re-exports
pub use slimrpc::{
RpcAppConnection, RpcChannel, RpcMessageContext, RpcHandlerType,
SRPCError, RpcServer, SessionContext as RpcSessionContext, RpcAppConfig,
create_and_connect_app, create_and_connect_app_async, new_rpc_app_config,
DEADLINE_KEY, MAX_TIMEOUT,
};

// UniFFI scaffolding setup (must be at crate root)
uniffi::setup_scaffolding!();
Loading
Loading