From 6d4ab8fb90ae2eaa3393dcbd37c83c486202b347 Mon Sep 17 00:00:00 2001
From: DMRobertson
Synapse can connect to PostgreSQL via the psycopg2 Python library. Building this library from source requires access to PostgreSQL's C header files. On Debian or Ubuntu Linux, these can be installed with sudo apt install libpq-dev
.
The source code of Synapse is hosted on GitHub. You will also need a recent version of git.
For some tests, you will need a recent version of Docker.
+A recent version of the Rust compiler is needed to build the native modules. The +easiest way of installing the latest version is to use rustup.
The preferred and easiest way to contribute changes is to fork the relevant project on GitHub, and then create a pull request to ask us to pull your @@ -222,6 +224,10 @@ to check that your contributions render correctly. The docs are written in
Some documentation also exists in Synapse's GitHub Wiki, although this is primarily contributed to by community authors.
+When changes are made to any Rust code then you must call either poetry install
+or maturin develop
(if installed) to rebuild the Rust code. Using maturin
+is quicker than poetry install
, so is recommended when making frequent
+changes to the Rust code.
While you're developing and before submitting a patch, you'll
@@ -270,7 +276,7 @@ working directory. Typically, this ends up being _trial_temp/test.db
The database file can then be inspected with:
sqlite3 _trial_temp/test.db
-Note that the database file is cleared at the beginning of each test run. Thus it +
Note that the database file is cleared at the beginning of each test run. Thus it will always only contain the data generated by the last run test. Though generally when debugging, one is only running a single test anyway.