This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Using Rust in Synapse #12164
Copy link
Copy link
Closed
Labels
T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impactMakes developers' lives better, but doesn't have direct user impactrustPull requests that update Rust codePull requests that update Rust code
Description
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://github.com/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.
gnunicorn, erlend-sh, samsartor and 654308d2 and cremesk
Metadata
Metadata
Assignees
Labels
T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Z-Dev-WishlistMakes developers' lives better, but doesn't have direct user impactMakes developers' lives better, but doesn't have direct user impactrustPull requests that update Rust codePull requests that update Rust code