You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compose host entry point: a @Composable that draws a Python-declared root and recomposes when it is replaced #18
pythonx-compose's declarative app root (thisisthepy/pythonx-compose#11): @app declares the root; the root lives in a Compose MutableState held by the Python runtime, so redeclaring it is an ordinary state write. The host needs a Kotlin @Composable that reads that state inside the composition and composes the Python root, so a replacement recomposes. Today PythonComposition exists only in ksp-fixtures/compose (test code).
Design (decided by the coordinator):
A generic entry point, e.g. PythonContent(root: PyObject) / PythonContent(module = "…", attribute = "…"): the host passes where the root state lives; the binder knows no library names (no pythonx anywhere).
The python-multiplatform library does not depend on Compose. The entry point goes in a new module python-multiplatform-compose (same naming as -ksp / -gradle-plugin), promoted from ksp-fixtures' PythonComposition/PythonComposed, which then use it.
Desktop first, then Android (same jvm code); iOS/wasm later.
Completion: a compose fixture test where Python declares a root, the window renders it, Python replaces the root (state write) and the next frame shows the new content without any host-side call; replacing back works; the composition disposes Python callables on dispose. All fixture modules and desktopTest stay green.
Activity
b-re-w commentedon Oct 2, 2026
Landed in develop via #48. Python-side state follows in #38.