Skip to main content

slim_config/
lib.rs

1// Copyright AGNTCY Contributors (https://github.com/agntcy)
2// SPDX-License-Identifier: Apache-2.0
3
4pub mod conn_type;
5
6cfg_if::cfg_if! {
7    if #[cfg(not(target_arch = "wasm32"))] {
8        pub mod auth;
9        pub mod backoff;
10        pub mod client;
11        pub mod component;
12        pub mod errors;
13        pub mod grpc;
14        pub mod pqc;
15        pub mod provider;
16        pub mod server;
17        pub mod server_handler;
18        pub mod testutils;
19        pub mod tls;
20        pub mod transport;
21        mod transport_common;
22        pub mod websocket;
23
24        mod opaque;
25
26        #[cfg(test)]
27        mod test_env;
28
29        pub use pqc::EnforcePqcPolicy;
30        pub use server_handler::ServerHandler;
31
32        pub const CLIENT_CONFIG_SCHEMA_JSON: &str =
33            include_str!("./schema/client-config.schema.json");
34        pub const SERVER_CONFIG_SCHEMA_JSON: &str =
35            include_str!("./schema/server-config.schema.json");
36    } else {
37        // Browser (wasm32) build: a minimal client-only transport surface. The data
38        // plane connects out over `wss://` using `gloo_net`; the gRPC/native-WebSocket
39        // server side, TLS, proxy and auth modules are native-only and stay disabled.
40        pub mod client;
41        pub mod component;
42        pub mod errors;
43        pub mod transport;
44        pub mod websocket;
45    }
46}