Nuitka Developer Manual

The purpose of this Developer Manual is to present the current design of Nuitka, the project rules, and the motivations for choices made. It is intended to be a guide to the source code, and to give explanations that don’t fit into the source code in comments form.

It should be used as a reference for the process of planning and documenting decisions we made. Therefore we are e.g. presenting here the type inference plans before implementing them. And we update them as we proceed.

It grows out of discussions and presentations made at conferences as well as private conversations or issue tracker.

Milestones

  1. Feature parity with CPython, understand all the language construct and behave absolutely compatible.

    Feature parity has been reached for CPython 2.6 and 2.7. We do not target any older CPython release. For CPython 3.3 up to 3.8 it also has been reached. We do not target the older and practically unused CPython 3.0 to 3.2 releases.

    This milestone was reached. Dropping support for Python 2.6 and 3.3 is an option, should this prove to be any benefit. Currently it is not, as it extends the test coverage only.

  2. Create the most efficient native code from this. This means to be fast with the basic Python object handling.

    This milestone was reached, although of course, micro optimizations to this are happening all the time.

  3. Then do constant propagation, determine as many values and useful constraints as possible at compile time and create more efficient code.

    This milestone is considered almost reached. We continue to discover new things, but the infrastructure is there, and these are easy to add.

  4. Type inference, detect and special case the handling of strings, integers, lists in the program.

    This milestone is considered in progress.

  5. Add interfacing to C code, so Nuitka can turn a ctypes binding into an efficient binding as written with C.

    This milestone is planned only.

  6. Add hints module with a useful Python implementation that the compiler can use to learn about types from the programmer.

    This milestone is planned only.