toolchain
A Gradle plugin that puts Python into a Kotlin Multiplatform app, and tcl, a one-verb installer for everyone else.Kotlin Multiplatform 앱에 Python을 넣는 Gradle 플러그인, 그리고 나머지 모두를 위한 한 단어 설치기 tcl.
Overview개요
toolchain is where a Kotlin build learns about Python. Its Gradle plugin adds a python { } block to an app's build; tcl, published as toolchain-lite, gives people without a Gradle project the same install step as one command.
toolchain은 Kotlin 빌드가 Python을 알게 되는 곳입니다. Gradle 플러그인이 앱 빌드에 python { } 블록을 더하고, toolchain-lite로 배포되는 tcl은 Gradle 프로젝트가 없는 사람에게 같은 설치 단계를 명령 하나로 줍니다.
The problem it solves푸는 문제
An app that embeds Python needs an interpreter per target, the standard library laid out where each platform loads it, dependencies built for each target, and all of it packaged into the platform's format. Done by hand, each app re-solves the same problems and gets some of them wrong.
Python을 넣은 앱에는 타깃마다 인터프리터, 플랫폼마다 불러오는 위치에 놓인 표준 라이브러리, 타깃마다 빌드한 의존성, 그리고 이 모두를 플랫폼 형식으로 묶는 일이 필요합니다. 손으로 하면 앱마다 같은 문제를 다시 풀고 그중 일부를 틀립니다.
How it works동작 방식
python {
version = "3.15"
dependencies("pythonx-compose", "torchnative")
}
From that block the plugin stages CPython for each target, asks pypackpack to install dependencies per target, and packs everything into the desktop jar, the Android APK and the iOS app. During development, hot reload sends changed Python to a running app.
python {
version = "3.15"
dependencies("pythonx-compose", "torchnative")
}
이 블록에서 플러그인이 타깃마다 CPython을 준비하고, pypackpack에 타깃별 의존성 설치를 맡기고, 모두를 데스크톱 jar, Android APK, iOS 앱에 넣습니다. 개발 중에는 핫 리로드가 바뀐 Python을 실행 중인 앱에 보냅니다.
Design decisions설계 결정
- One module, one name. The Gradle plugin lives in
toolchain/, with tcl as a separate source set inside it, so tcl's dependencies never leak into the plugin. - Web isolated by default. For WebAssembly apps the plugin emits the cross-origin isolation headers for the dev server and for hosting, plus a service-worker fallback.
- 모듈 하나, 이름 하나. Gradle 플러그인은
toolchain/에 있고 tcl은 그 안의 별도 소스 세트라서, tcl의 의존성이 플러그인에 새지 않습니다. - 웹은 기본 격리. WebAssembly 앱을 위해 개발 서버와 호스팅용 교차 출처 격리 헤더와 서비스 워커 대체를 생성합니다.
Where it fits생태계 안의 위치
It drives pypackpack for dependencies and python-multiplatform's plugin for interpreter staging and bindings.
의존성은 pypackpack을, 인터프리터 준비와 바인딩은 python-multiplatform의 플러그인을 움직입니다.
Where it stands현재 상태
Working: desktop jar and Android APK end to end; tcl wheels for four platforms. In progress: formal iOS wiring for apps outside the repository, plugin publication.
동작: 데스크톱 jar와 Android APK 처음부터 끝까지, 네 플랫폼용 tcl wheel. 진행 중: 저장소 밖 앱을 위한 iOS 연결 정식화, 플러그인 공개 배포.
Future design미래 설계
- A published plugin any Kotlin Multiplatform app can apply.
- CPython 3.15t by default, including the free-threaded interpreters built for Android and iOS.
- Cross-origin isolation for the web, generated rather than configured.
- 어떤 Kotlin Multiplatform 앱이든 적용할 수 있는 공개 배포 플러그인.
- Android와 iOS용으로 빌드한 free-threaded 인터프리터를 포함한 기본 CPython 3.15t.
- 설정하는 것이 아니라 생성되는 웹 교차 출처 격리.
Roadmap로드맵
- toolchain-lite 0.1.0: published from the release in hand.
- Plugin 1.0.0-alpha01, 2026-11-30.
- toolchain-lite 0.1.0: 준비된 릴리스로 게시.
- 플러그인 1.0.0-alpha01, 2026-11-30.