Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

engine: explore the possibility to implementing pieces of the engine in rust #2843

Open
hellais opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels

Comments

@hellais
Copy link
Member

hellais commented Jan 27, 2025

This is related to the engine simplification work.

The reasons for doing this are:

This issue is about doing exploratory research to understand the limits of this.

The order or priorities to implement this would be to first focus on the probe-services components which we need for the anonymous credentials project and then eventually move over to experiments (which are going to take a very long time to fully rewrite in rust).

In the interim the tentative plan is to ship both a golang and rust library to the apps which we load dynamically and call either rust or go code depending on what we need.

This is related to: #2826

@hellais
Copy link
Member Author

hellais commented Jan 27, 2025

Work on this has started as part of https://github.com/ooni/ooniprobe-rs/.

So far the pieces that have been explored are:

  • How to parrot TLS
  • How to expose a nice JNI to kotlin
  • How to do request tracing to measure timing information (this is relevant for experiments)
  • How to mimic the ooni data formats

Based on these initial findings the direction seems quite promising. The most delicate layer seems to be that of integrating it into the kotlin codebase, though it's nice that common rust idioms of method chaining translate naturally over to kotlin. The main pieces that are a bit tricky are those of wrapping and passing around raw pointers in the JNI bindings making sure this stuff is memory and thread safe.

Next things to look at in relation to jni are:

This was referenced Jan 27, 2025
@hellais hellais removed this from Roadmap Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant