Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Using Rust in Synapse #12164

Closed
3 of 5 tasks
erikjohnston opened this issue Mar 4, 2022 · 2 comments
Closed
3 of 5 tasks

Using Rust in Synapse #12164

erikjohnston opened this issue Mar 4, 2022 · 2 comments
Labels
rust Pull requests that update Rust code T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact

Comments

@erikjohnston
Copy link
Member

erikjohnston commented Mar 4, 2022

There is a general desire to have the option to write some code in Rust, especially performance sensitive code. Currently Synapse can optionally use the https:/erikjohnston/rust-jaeger-python-client library when connecting to Jaeger, however we expect future Rust components would not be optional (to avoid having to maintain the same code in two different languages).

Some things that we need to figure out before we can start doing this:

  • Ensure that our package build systems correctly work with Rust dependencies.
  • Where we keep the Rust code, and how we hook it into Synapse (e.g. is it in the same repo, are the Rust modules done as a separate python library, etc)
  • How to hook Rust logging into python logging (probably pyo3-log will just work)
  • How to call async functions to/from Rust (will pyo3-asyncio just work? Does it need us to use the asyncio reactor?)
  • How do we handle log contexts? How do we record CPU usage in Rust?

Ideally we'd start with a trivial module as a PoC before tackling anything larger.

@erikjohnston erikjohnston added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Mar 4, 2022
@MadLittleMods MadLittleMods added the Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact label Apr 25, 2023
@MadLittleMods
Copy link
Contributor

@erikjohnston Is this issue still useful to you? We've already introduced Rust into the codebase in Synapse 1.68.0rc1

Track remaining teething issues separately?

@MadLittleMods MadLittleMods added the rust Pull requests that update Rust code label Apr 25, 2023
@erikjohnston
Copy link
Member Author

Good point!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rust Pull requests that update Rust code T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. Z-Dev-Wishlist Makes developers' lives better, but doesn't have direct user impact
Projects
None yet
Development

No branches or pull requests

2 participants