API¶
The ppy-lang distribution installs three packages. The pages in this
section are generated at build time from the docstrings in the source. The
public surface of each module is what its __all__ lists.
| package | contents | when you import it |
|---|---|---|
ppy |
the directives, the markers, typed input, and the namespaces a program writes against (native, simd, atomic, concurrent, parallel, aio, cuda, xla …), each a reference implementation under CPython |
every .ppy program, and every .py that imports a .ppy module |
ppy_runtime |
what a built artifact needs at launch: the manifest, the bindings, the launcher, and the runtimes native code calls into; never imports the compiler | the launcher does; a program reaches for ppy_runtime.arrow or launch.main at most |
| Plugin API | ppy_compiler.plugins.base: the class a library plugin extends and the lowering specs a call answers with |
when writing a library plugin |
| IR | ppy_compiler.ir: the canonical IR's model, types, dialects, passes, patterns, verifier, linker, and codec |
when a plugin registers a dialect or a pass, or a tool reads .ppyir |
| Backend API | ppy_compiler.backend: the class a code-generating backend extends, the context and formats it is handed, and the registry that finds one |
when writing a backend for another target |
The rest of ppy_compiler (analysis, lowering, the builtin backends, the
driver) is the implementation behind the CLI and is not public API.
Compatibility says what is stable.