SQL StateStore for matrix-sdk

Build Status Code Coverage License Docs - Main

This crate allows you to use your postgres/sqlite database as a state and crypto store for matrix-sdk.

Crate Features

Exactly one of rustls and native-tls need to be enabled. At least one of postgres or sqlite must be enabled.

Minimum Supported Rust Version

The MSRV is currently 1.60.0.

Increasing the MSRV is a breaking change.

Usage

This crate integrates with your existing SQLx database pool.

```rust

let sqlpool: Arc> = /* ... */; // Create the state store, applying migrations if necessary let statestore = StateStore::new(&sql_pool).await?;

```

After that you can pass it into your client builder as follows:

```rust let storeconfig = StoreConfig::new().statestore(Box::new(state_store));

let clientbuilder = Client::builder() /* ... */ .storeconfig(store_config) ```

Authors

License

This project is licensed under the Apache-2.0 License - see the LICENSE.md file for details

Acknowledgments

Contributors

DarkKirb
Charlotte