surreal-sync-runtime 0.6.0

Shared runtime: apply pipeline, init, SurrealDB config, and transform loading for surreal-sync
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Process init shared by the CLI and embed entrypoints.

use rustls::crypto::CryptoProvider;

/// Install the TLS crypto provider and initialize tracing.
///
/// Called automatically by `from-*` `run` / `run::<Sink>` entrypoints. Call this
/// yourself if you use lower-level `run_sync(&sink, …)` APIs directly.
pub fn init() {
    if let Err(err) = CryptoProvider::install_default(rustls::crypto::aws_lc_rs::default_provider())
    {
        eprintln!("Error setting up crypto provider for TLS: {err:?}");
    }

    tracing_subscriber::fmt()
        .with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
        .init();
}