Skip to main content

aranya_client/
lib.rs

1//! The Aranya client library.
2//!
3//! The Aranya Client library provides the following features to application developers:
4//! - IDAM/RBAC/ABAC (identity & access management, role-based access controls, attribute-based access controls, security controls)
5//! - Aranya Fast Channels (secure, encrypted data transmission)
6//!
7//! For more information refer to:
8//! - The `aranya-client` [README]
9//! - The [walkthrough]
10//!
11//! [README]: https://github.com/aranya-project/aranya/tree/main/crates/aranya-client/README.md
12//! [walkthrough]: https://github.com/aranya-project/aranya/tree/main/docs/walkthrough.md
13
14#![cfg_attr(docsrs, feature(doc_cfg))]
15#![warn(
16    clippy::alloc_instead_of_core,
17    clippy::implicit_saturating_sub,
18    clippy::missing_panics_doc,
19    clippy::ptr_as_ptr,
20    clippy::string_slice,
21    clippy::unimplemented,
22    missing_docs
23)]
24
25// TODO: https://github.com/aranya-project/aranya/issues/448
26#[cfg(not(feature = "default"))]
27compile_error!("'default' feature must be enabled!");
28
29pub mod afc;
30pub mod client;
31pub mod config;
32pub mod error;
33mod util;
34
35pub use aranya_policy_text::{text, Text};
36pub use aranya_util::Addr;
37
38#[doc(inline)]
39#[expect(deprecated)]
40pub use crate::client::KeyBundle;
41#[cfg(feature = "preview")]
42#[cfg_attr(docsrs, doc(cfg(feature = "preview")))]
43#[doc(inline)]
44pub use crate::client::{Permission, RoleManagementPermission};
45#[cfg(feature = "preview")]
46#[cfg_attr(docsrs, doc(cfg(feature = "preview")))]
47#[doc(inline)]
48pub use crate::config::{HelloSubscriptionConfig, HelloSubscriptionConfigBuilder};
49#[doc(inline)]
50pub use crate::{
51    client::{
52        ChanOp, Client, Device, DeviceId, Devices, Label, LabelId, Labels, PublicKeyBundle, Role,
53        RoleId, Roles, Team, TeamId,
54    },
55    config::{
56        AddTeamConfig, AddTeamConfigBuilder, AddTeamQuicSyncConfig, CreateTeamConfig,
57        CreateTeamConfigBuilder, CreateTeamQuicSyncConfig, CreateTeamQuicSyncConfigBuilder,
58        SyncPeerConfig, SyncPeerConfigBuilder,
59    },
60    error::{ConfigError, Error, Result},
61};