summary refs log tree commit diff
path: root/develop/print.html
diff options
context:
space:
mode:
authorerikjohnston <erikjohnston@users.noreply.github.com>2022-09-06 18:02:25 +0000
committererikjohnston <erikjohnston@users.noreply.github.com>2022-09-06 18:02:25 +0000
commit45fcf7532ca507532b8b89ef19ca65475e4dbb0f (patch)
treec504bbe6448aac7a93c4308b21839fcc7bbefe6c /develop/print.html
parentdeploy: 571f565c1fa1e00462f9c96c3907d3304a37e39f (diff)
downloadsynapse-45fcf7532ca507532b8b89ef19ca65475e4dbb0f.tar.xz
deploy: c9b7e9735508bb148c6ad59c433d71e5b8b360ad
Diffstat (limited to 'develop/print.html')
-rw-r--r--develop/print.html21
1 files changed, 20 insertions, 1 deletions
diff --git a/develop/print.html b/develop/print.html
index bd0b3d5e99..09cf27ac28 100644
--- a/develop/print.html
+++ b/develop/print.html
@@ -360,6 +360,9 @@ and mounting it to <code>/var/synapse</code> should be taken into consideration.
 <li>Python 3.7 or later, up to Python 3.10.</li>
 <li>At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org</li>
 </ul>
+<p>If building on an uncommon architecture for which pre-built wheels are
+unavailable, you will need to have a recent Rust compiler installed. The easiest
+way of installing the latest version is to use <a href="https://rustup.rs/">rustup</a>.</p>
 <p>To install the Synapse homeserver run:</p>
 <pre><code class="language-sh">mkdir -p ~/synapse
 virtualenv -p python3 ~/synapse/env
@@ -14193,6 +14196,8 @@ on Windows is not officially supported.</p>
 <p>Synapse can connect to PostgreSQL via the <a href="https://pypi.org/project/psycopg2/">psycopg2</a> 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 <code>sudo apt install libpq-dev</code>.</p>
 <p>The source code of Synapse is hosted on GitHub. You will also need <a href="https://github.com/git-guides/install-git">a recent version of git</a>.</p>
 <p>For some tests, you will need <a href="https://docs.docker.com/get-docker/">a recent version of Docker</a>.</p>
+<p>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 <a href="https://rustup.rs/">rustup</a>.</p>
 <h1 id="3-get-the-source"><a class="header" href="#3-get-the-source">3. Get the source.</a></h1>
 <p>The preferred and easiest way to contribute changes is to fork the relevant
 project on GitHub, and then <a href="https://help.github.com/articles/using-pull-requests/">create a pull request</a> to ask us to pull your
@@ -14249,6 +14254,10 @@ to check that your contributions render correctly. The docs are written in
 <p>Some documentation also exists in <a href="https://github.com/matrix-org/synapse/wiki">Synapse's GitHub
 Wiki</a>, although this is primarily
 contributed to by community authors.</p>
+<p>When changes are made to any Rust code then you must call either <code>poetry install</code>
+or <code>maturin develop</code> (if installed) to rebuild the Rust code. Using <a href="https://github.com/PyO3/maturin"><code>maturin</code></a>
+is quicker than <code>poetry install</code>, so is recommended when making frequent
+changes to the Rust code.</p>
 <h1 id="8-test-test-test"><a class="header" href="#8-test-test-test">8. Test, test, test!</a></h1>
 <p><a name="test-test-test"></a></p>
 <p>While you're developing and before submitting a patch, you'll
@@ -14297,7 +14306,7 @@ working directory. Typically, this ends up being <code>_trial_temp/test.db</code
 <p>The database file can then be inspected with:</p>
 <pre><code class="language-sh">sqlite3 _trial_temp/test.db
 </code></pre>
-<p>Note that the database file is cleared at the beginning of each test run. Thus it 
+<p>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 <em>last run test</em>. Though generally
 when debugging, one is only running a single test anyway.</p>
 <h3 id="running-tests-under-postgresql"><a class="header" href="#running-tests-under-postgresql">Running tests under PostgreSQL</a></h3>
@@ -16669,6 +16678,10 @@ version in future releases.</p>
 <p>Details on the upstream support life cycles for Python and PostgreSQL are
 documented at <a href="https://endoflife.date/python">https://endoflife.date/python</a> and
 <a href="https://endoflife.date/postgresql">https://endoflife.date/postgresql</a>.</p>
+<p>A Rust compiler is required to build Synapse from source. For any given release
+the minimum required version may be bumped up to a recent Rust version, and so
+people building from source should ensure they can fetch recent versions of Rust
+(e.g. by using <a href="https://rustup.rs/">rustup</a>).</p>
 <h2 id="context"><a class="header" href="#context">Context</a></h2>
 <p>It is important for system admins to have a clear understanding of the platform
 requirements of Synapse and its deprecation policies so that they can
@@ -16679,6 +16692,12 @@ long process.</p>
 <p>By following the upstream support life cycles Synapse can ensure that its
 dependencies continue to get security patches, while not requiring system admins
 to constantly update their platform dependencies to the latest versions.</p>
+<p>For Rust, the situation is a bit different given that a) the Rust foundation
+does not generally support older Rust versions, and b) the library ecosystem
+generally bump their minimum support Rust versions frequently. In general, the
+Synapse team will try to avoid updating the dependency on Rust to the absolute
+latest version, but introducing a formal policy is hard given the constraints of
+the ecosystem.</p>
 <div style="break-before: page; page-break-before: always;"></div><h2 id="summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs"><a class="header" href="#summary-of-performance-impact-of-running-on-resource-constrained-devices-such-as-sbcs">Summary of performance impact of running on resource constrained devices such as SBCs</a></h2>
 <p>I've been running my homeserver on a cubietruck at home now for some time and am often replying to statements like &quot;you need loads of ram to join large rooms&quot; with &quot;it works fine for me&quot;. I thought it might be useful to curate a summary of the issues you're likely to run into to help as a scaling-down guide, maybe highlight these for development work or end up as documentation. It seems that once you get up to about 4x1.5GHz arm64 4GiB these issues are no longer a problem.</p>
 <ul>