indygreg added a comment.

  To be honest, we're not yet sure what we'll decide for the Python -> Rust 
bridge. The problem is summarized in the `Rust <=> Python Interop` section on 
https://www.mercurial-scm.org/wiki/OxidationPlan.
  
  I suspect at some level we'll need a CPython extension for CPython for 
performance reasons (especially for high volume function calls). PyPy obviously 
uses CFFI. I think the ideal outcome is we can write Rust that exposes a C API 
and use CFFI natively on PyPy and something like `cbindgen` + `Milksnake` to 
auto-generate a CPython extension that acts as a wrapper around the C API 
exposed by Rust. I'm not sure if anyone has invented this exact wheel yet. If 
not, it's probably faster to use `rust-cpython`. Maybe several months from now 
we have enough Rust and maintaining `rust-cpython` is painful enough that we 
pursue the auto-generated CPython extension route.
  
  What I'm trying to say is you have a green field to explore! But at this 
juncture, perfect is the enemy of done. We'll be happy with any forward 
progress, even failed experiments.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2057

To: Ivzhh, #hg-reviewers
Cc: krbullock, indygreg, durin42, kevincox, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to