Skip to content

gonicus/gouda-matrix

Repository files navigation

GOuda Matrix

Rust License: MIT

A Matrix client for the GONICUS GOuda API.

Architecture

GOuda Matrix acts as a bridge between a GOuda application (e.g. GOnnect) and the Matrix protocol, implementing all Matrix specific operations including authentication, messaging, room management and end-to-end encryption.

GOuda Matrix and the application communicate through two local sockets, one for receiving requests from the application and one for sending responses and events back. For both sockets the application acts as the server, while GOuda Matrix is the client connecting to the local socket.

flowchart LR

A["GOuda Application<br/>e.g. GOnnect"]
B["GOuda Matrix"]
C["Matrix"]

A -- "Local Socket for Requests" --> B
B -- "Local Socket for Responses" --> A
B <--> C
Loading

Crates

This workspace contains the following crates:

Crate Description
gouda_matrix Implements the Matrix client that uses local sockets to communicate with a GOuda application.
gouda_core Core functionality for GOuda rust clients, provides an abstraction layer over the GOuda API.
gouda_proto Contains the compiled Protocol Buffers of the GOuda API.

Getting Started

Prerequisites

  • Rust (latest stable)
  • Protoc (for building protobuf definitions)
  • just (optional, for running commands via the justfile)

Building

# Clone the repository including submodules
git clone --recursive https://github.com/gonicus/gouda-matrix.git

cd gouda-matrix

cargo build

Running Tests

just test

Code Quality Checks

# Run all checks (clippy, fmt, tests, unused deps, typos)
just check

# Format code
just fmt

Usage

Example: Rust GOuda Application

A reference and testing implementation for a GOuda application is provided in examples/rust_gouda_app/, demonstrating how a GOuda application can communicate with GOuda Clients over local sockets. It uses egui and eframe for a simple UI to execute requests and display received responses.

cargo run --bin rust_gouda_app /tmp/gouda-request-socket /tmp/gouda-response-socket

Running GOuda Matrix

Once both local sockets are available for connection, GOuda Matrix can be started.

cargo run --bin gouda_matrix /tmp/gouda-request-socket /tmp/gouda-response-socket

About

Matrix implementation for the GOuda API

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages