Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 832 Bytes

File metadata and controls

23 lines (14 loc) · 832 Bytes

Rough steps for migration, with a lot of overlap possible between steps:

  1. Increase test coverage.

  2. Convert __init__ constructors to __new__ constructors, because of a pyo3 limitation.

  3. Place a Rust superclass over every Python class.

  4. Move instance variables from the Python constructor into the Rust class.

  5. Convert individual methods of Python classes into Rust. When migrating a caller before a callee or when invoking a function that is overridden in a subclass, use pyo3 Python function invocation. Use Bound psuedo-receivers to access superclasses.

  6. Duplicate constant data from superclasses into subclasses.

  7. Use &self method receivers.

  8. Replace polymorphic superclasses with traits.

  9. Replace all pyo3 Python calls with Rust calls.