resolvematrix
resolvematrix is a Rust library providing the ability to resolve Matrix server-to-server endpoints from the server name.
It conforms to the Server discovery chapter of the Matrix specification.
The library is tested against the https://resolvematrix.dev suite and other live Matrix servers.
This library depends on hickory-resolver, reqwest, serde and (indirectly) tokio.
Usage
cargo add resolvematrix
Example
use ;
// Create a new resolver
let resolver = new;
// Or to use custom options:
// MatrixResolverBuilder::new().cache_ttl(Duration::from_secs(10)).build()?
// Resolve a server name
let server_name = "matrix.org";
let resolution = resolver.resolve_server.await?;
eprintln!;
let client = resolver.create_client.unwrap;
let url = format!;
let response = client.get.send.await;
For more examples, see the examples directory.
Contributing
Resolvematrix is part of the Continuwuity project. Please see the Contributing guide before submitting a pull request.
Code of Conduct
Contributors are expected to follow the Continuwuity Community Guidelines.