Cargo Features

[dependencies]
synapse = { version = "1.1.0", default-features = false, features = ["enhanced-auth", "std", "minimal", "core", "crypto", "http", "mdns", "auto_discovery", "cache", "telemetry", "networking", "email", "database", "auth", "native", "wasm"] }
default = native

The native feature is set by default whenever synapse is added without default-features = false somewhere in the dependency tree.

enhanced-auth

Auth features

Affects example::setup_enhanced_auth_example, synapse::auth

std

Standard library support

minimal core? = telemetry

Minimal feature set for basic functionality

Enables base64, bincode ^2.0.1, config, dashmap, rand, sha2, tokio, and toml

toml:

Configuration - optional

core auth? database? email? native networking? = crypto, minimal

Core functionality (minimal dependencies)

Enables ahash and clap

crypto core? native

Feature definitions for subsystems and implementations

Enables aes-gcm, base64, blake3, ed25519-dalek, ring, rsa, and sha2

ring:

Cryptography

Affects crypto::CryptoManager

http native networking?

Enables reqwest, tokio-tungstenite ^0.27.0, and tungstenite ^0.27.0

reqwest:

Networking - optional

Affects abstraction::HttpTransportFactory

mdns auto_discovery? native networking?

Using auto-discovery crate now

Enables auto-discovery and socket2

socket2:

Network discovery - uses auto-discovery crate
Used for other network operations

auto_discovery = mdns

Enables auto-discovery

cache database? native

Enables redis ^0.32.4

Affects cache::Cache, privacy_manager::PrivacyManager

telemetry minimal? native

Enables tracing-subscriber

networking native = core, http, mdns

Networking feature (adds network transport capabilities)

Enables futures-util

email native = core

Email feature (adds email server capabilities)

Enables async-imap ^0.10, async-smtp, lettre, and mail-parser

async-smtp:

Email protocols - optional

Affects email::EmailTransport

database native = cache, core

Database feature (adds database support)

Enables sqlx

Database connections - optional

Affects trust_manager::TrustManager, database::Database, migrations::MigrationManager, privacy_manager::PrivacyManager

auth native = auth-framework, core

Authentication feature (adds federated authentication)

Affects auth_integration::AuthContext, auth_integration::MfaChallenge, synapse::auth_integration

native default = auth, cache, core, crypto, database, email, http, mdns, networking, telemetry

Full native platform support (the original working config but with updated deps)

Enables parking_lot and sysinfo ^0.36.0

sysinfo:

System monitoring - optional

wasm

WASM feature for browser environments

Enables console_error_panic_hook, getrandom, gloo-storage, gloo-utils, js-sys, wasm-bindgen, wasm-bindgen-futures, wasm-logger, and web-sys

wasm-bindgen:

WASM-specific dependencies

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

auth-framework auth?

Enables auth-framework ^0.3

Authentication framework