Beyond Python¶
A reusable capability block's code runs in a runtime provider: the process in
the block's cell that hosts a language runtime and calls the block's code.
CPython is the provider today, and cpython is the provider kind bake records
in every capsule. The contracts around the provider are language-neutral, so a
provider for another runtime, such as a JVM, Wasm or a native command runtime,
sits behind the same boundary.
What is language-neutral¶
- The interface. XCI describes methods and types independently of Python, and the Python code generation produces is one binding of it. See Language neutrality.
- The values. Typed values, buffers, streams, artifacts and handles have one encoding whichever runtime produced them. See Block boundary.
- The provider protocol. The cell monitor drives a provider through one protocol: handshake, prepare, dispatch, interrupt, release, health, quiesce and terminate.
How a provider is admitted¶
At the handshake, the provider states what it supports, and the monitor states what the capsule's interface needs:
| The provider reports | The capsule's interface requires |
|---|---|
| Protocol version | Protocol version |
| Value-plane codec versions | Codec versions, most preferred first |
| Resources, streams, buffers, interruption and quiesce support | The features it cannot run without |
| Buffer formats it reads | The buffer formats it cannot run without |
| Its concurrency model and largest inline value | Its largest inline value |
A missing required feature or buffer format ends the handshake. A missing optional one narrows the session. The provider's kind and version are recorded for evidence and diagnostics, and the session is settled on the features alone: two providers reporting the same features settle the same session.
What a capsule states¶
A capsule names the provider it needs by kind, ABI and minimum version, and the closure records the exact provider that was admitted. See Provider requirements.