Migration from Cython
May 30, 2026 | 5 min read
Removing .pyx Files
Replace Cython .pyx files with plain .py files. Pyvorin compiles them to native code without manual type declarations:
# Before (Cython)
def fib(int n):
cdef int a = 0, b = 1, i
for i in range(n):
a, b = b, a + b
return a
# After (Pyvorin)
def fib(n: int) -> int:
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
Build System
Remove setup.py Cython extensions and .pxd files. Add Pyvorin to your CI pipeline instead.
cdef Classes
Cython cdef class performance can be matched with Pyvorin-compiled dataclasses and functions operating on them.