A Python that runs everywhere Kotlin runs.Kotlin이 도는 모든 곳에서 도는 Python.
thisisthepy is a family of open-source projects that make Python a first-class language for building real applications on Android, iOS, desktop and the web. CPython is embedded in Kotlin Multiplatform, the two languages call each other in both directions, one toolchain builds and ships the result, and a set of Python libraries turns the Kotlin ecosystem into something that feels like Python.thisisthepy는 Python을 Android, iOS, 데스크톱, 웹에서 진짜 애플리케이션을 만드는 일급 언어로 만드는 오픈소스 프로젝트 모음입니다. CPython을 Kotlin Multiplatform 안에 넣고, 두 언어가 양방향으로 서로를 부르게 하고, 하나의 도구 체인으로 빌드하고 배포하며, 일련의 Python 라이브러리가 Kotlin 생태계를 Python답게 쓰게 합니다.
The problem풀려는 문제
Python is the language most people learn first, the language of data and machine learning, and the language of notebooks, where a running program is changed one cell at a time. Four things keep it out of the applications people and agents build today.
- Python cannot ship an app. A Python programmer who wants a phone app is told to learn Kotlin or Swift. Existing bridges either draw their own non-native widgets, run inside a web view, or wrap each platform API by hand and fall behind.
- Models stop at the notebook. A model that works in a notebook is rewritten, converted or moved to a server before it can run on a phone. PyTorch itself does not ship on most devices.
- Python is slow and single-core where apps need speed. The usual answers are C extensions, which do not exist for mobile, or tools that change Python's rules, and the GIL keeps Python on one core.
- Python is losing its edge in the age of AI agents. More and more code is written and changed by agents. An agent works best where a mistake is caught before the program runs: Rust and TypeScript give it types and a compiler that answer at once, while untyped Python only reveals what it does when it is executed, one run at a time. The qualities that made Python easy for people, no declarations and no build step, become a cost when the author is an agent, and Python's advantage over Rust and TypeScript shrinks with every year.
The fourth problem shapes everything else. Python here is agent-first: types are part of the language as it is used, a build-time gate turns a value that leaks to Any into an error, and typed code is compiled ahead of time. An agent gets the same fast, precise feedback it gets from a Rust or TypeScript compiler, and the result runs fast on every device, without giving up Python's readability or CPython's exact behaviour.
Kotlin Multiplatform has already solved the platform half: one codebase, native UI through Compose Multiplatform, Android, iOS, desktop and the web. thisisthepy brings Python into that world instead of building a parallel one.
Python은 많은 사람이 처음 배우는 언어이고, 데이터와 머신러닝의 언어이며, 실행 중인 프로그램을 셀 하나씩 바꾸는 노트북의 언어입니다. 그런데 네 가지가 Python을 오늘 사람과 에이전트가 만드는 애플리케이션에서 밀어냅니다.
- Python으로는 앱을 배포할 수 없습니다. 휴대폰 앱을 만들고 싶은 Python 개발자는 Kotlin이나 Swift를 배우라는 말을 듣습니다. 기존 다리들은 네이티브가 아닌 자체 위젯을 그리거나, 웹뷰 안에서 돌거나, 플랫폼 API를 손으로 하나씩 감싸다가 뒤처집니다.
- 모델은 노트북에서 멈춥니다. 노트북에서 도는 모델을 휴대폰에서 돌리려면 다시 쓰거나, 변환하거나, 서버로 옮겨야 합니다. PyTorch 자체는 대부분의 기기에 들어가지 않습니다.
- 앱이 속도를 필요로 하는 곳에서 Python은 느리고 한 코어만 씁니다. 흔한 해법은 모바일에는 없는 C 확장이거나 Python의 규칙을 바꾸는 도구이고, GIL은 Python을 한 코어에 묶어 둡니다.
- AI 에이전트 시대에 Python은 장점을 잃어 가고 있습니다. 점점 더 많은 코드를 에이전트가 쓰고 고칩니다. 에이전트는 프로그램을 실행하기 전에 실수가 잡히는 곳에서 가장 잘 일합니다. Rust와 TypeScript는 타입과 컴파일러가 바로 답을 주지만, 타입이 없는 Python은 실행해 봐야, 그것도 한 번에 하나씩만 무엇을 하는지 드러냅니다. 선언도 빌드 단계도 없어서 사람에게 쉬웠던 성질이, 작성자가 에이전트가 되면 비용이 되고, Rust와 TypeScript에 비한 Python의 장점은 해마다 줄어듭니다.
네 번째 문제가 나머지 전부의 방향을 정합니다. 여기서 Python은 에이전트 우선(agent-first)입니다. 타입은 실제로 쓰는 언어의 일부이고, 빌드 시점의 게이트가 Any로 새는 값을 오류로 만들며, 타입 붙은 코드는 미리 컴파일됩니다. 에이전트는 Rust나 TypeScript 컴파일러에서 얻는 것과 같은 빠르고 정확한 피드백을 얻고, 결과물은 모든 기기에서 빠르게 돕니다. Python의 읽기 쉬움도, CPython과 똑같은 동작도 포기하지 않습니다.
플랫폼 쪽 절반은 Kotlin Multiplatform이 이미 풀었습니다. 코드베이스 하나, Compose Multiplatform의 네이티브 UI, 그리고 Android, iOS, 데스크톱, 웹. thisisthepy는 평행한 세계를 따로 만들지 않고 Python을 그 세계 안으로 데려갑니다.
The approach접근 방식
The ecosystem rests on four bets. Each project exists to make one of them true.
1. The Kotlin ecosystem is Python's standard library for apps
Instead of wrapping platform APIs for Python one by one, make every Kotlin library callable from Python under its own name, generated from the compiled library at build time. Compose, Jetpack, kotlinx and every third-party Kotlin library become available the day they ship.
2. Real CPython, everywhere
Not a Python-like language and not a reimplementation: the reference interpreter, unmodified, so every extension, wheel and semantic rule applies. On every platform the same interpreter, in its free-threaded build.
3. One build for every platform
The Python half of an app is resolved, compiled and bundled for each target by the same tool that builds the Kotlin half, so shipping to a phone is a build setting, not a port.
4. Python that is typed, compiled, declarative and parallel: agent-first
Types are checked in the build and typed code is compiled without changing its meaning, so an agent gets compiler feedback before anything runs. Screens and scenes are declared, so an agent can read and rewrite them. Threads run Python on every core. The language people already know becomes the one people and agents can ship.
생태계는 네 가지 내기 위에 섭니다. 각 프로젝트는 그중 하나를 참으로 만들기 위해 있습니다.
1. Kotlin 생태계가 Python의 앱 표준 라이브러리다
플랫폼 API를 Python용으로 하나씩 감싸지 않고, 모든 Kotlin 라이브러리를 원래 이름 그대로 Python에서 부를 수 있게 합니다. 빌드할 때 컴파일된 라이브러리에서 생성합니다. Compose, Jetpack, kotlinx, 그리고 모든 서드파티 Kotlin 라이브러리를 나오는 날부터 씁니다.
2. 어디서나 진짜 CPython
Python 비슷한 언어도, 재구현도 아닙니다. 고치지 않은 기준 인터프리터라서 모든 확장, 휠, 의미 규칙이 그대로 적용됩니다. 모든 플랫폼에서 같은 인터프리터를, free-threaded 빌드로 씁니다.
3. 모든 플랫폼을 위한 하나의 빌드
앱의 Python 절반을 Kotlin 절반을 빌드하는 같은 도구가 타깃마다 해석하고, 컴파일하고, 묶습니다. 휴대폰으로 배포하는 것은 포팅이 아니라 빌드 설정 하나입니다.
4. 타입 있고, 컴파일되고, 선언형이고, 병렬인 Python: 에이전트 우선
타입은 빌드에서 검사하고, 타입 붙은 코드는 의미를 바꾸지 않고 컴파일해서, 에이전트가 실행하기 전에 컴파일러의 피드백을 받습니다. 화면과 장면은 선언하므로 에이전트가 읽고 다시 쓸 수 있습니다. 스레드가 모든 코어에서 Python을 실행합니다. 사람들이 이미 아는 언어가 사람과 에이전트가 함께 배포하는 언어가 됩니다.
Architecture구조
The five layers
- Foundation. CPython is the interpreter, moving to the free-threaded 3.15 build on every platform. Kotlin Multiplatform gives each platform a native host process and Compose Multiplatform a native UI. compose-multiplatform-core-extended forks Compose so desktop windows need no AWT, on GraalVM native image and on Kotlin/Native, and its plugin fork ships one app as a JVM app, a native-image executable or a Kotlin/Native executable.
- Build and ship. pypackpack resolves and builds the Python half of an app for every target, including the C, C++ and Rust extensions it depends on. The toolchain Gradle plugin puts that result, and the interpreter, inside the Kotlin build.
- Language and runtime. python-multiplatform embeds the interpreter and is the bridge between the two languages. TypedPython, inside it, compiles typed Python. torchnative runs machine-learning models through a Rust runtime.
- pythonx. Python libraries in the spirit of androidx and kotlinx, sharing one
pythonxnamespace package. Each imports Kotlin libraries through the bridge and gives them a Python shape: declarative UI, structured concurrency, declarative graphics, device features. - Apps. Applications written mostly or entirely in Python. Gemstone is the ecosystem's own.
How a call crosses the bridge
expect function per CPython C API call, about 330, implemented per platformHow an app is built
python { } block in the app's build.pyi stubs generated다섯 계층
- 토대. CPython이 인터프리터이고, 모든 플랫폼에서 free-threaded 3.15 빌드로 옮겨 가고 있습니다. Kotlin Multiplatform이 플랫폼마다 네이티브 호스트 프로세스를, Compose Multiplatform이 네이티브 UI를 줍니다. compose-multiplatform-core-extended는 Compose를 포크해 GraalVM native image와 Kotlin/Native에서 AWT 없이 데스크톱 창을 띄우고, 짝인 플러그인 포크는 같은 앱을 JVM 앱, native-image 실행 파일, Kotlin/Native 실행 파일 중 하나로 내보냅니다.
- 빌드와 배포. pypackpack이 앱의 Python 절반을 모든 타깃용으로 해석하고 빌드합니다. 의존하는 C, C++, Rust 확장도 포함합니다. toolchain Gradle 플러그인이 그 결과와 인터프리터를 Kotlin 빌드 안에 넣습니다.
- 언어와 런타임. python-multiplatform이 인터프리터를 넣고 두 언어 사이의 다리가 됩니다. 그 안의 TypedPython이 타입 붙은 Python을 컴파일합니다. torchnative는 Rust 런타임으로 머신러닝 모델을 돌립니다.
- pythonx. androidx, kotlinx와 같은 정신의 Python 라이브러리이고, 하나의
pythonx네임스페이스 패키지를 함께 씁니다. 각각 다리를 통해 Kotlin 라이브러리를 가져와 Python의 모양을 줍니다. 선언형 UI, 구조적 동시성, 선언형 그래픽스, 기기 기능입니다. - 앱. 대부분 또는 전부를 Python으로 쓴 애플리케이션입니다. Gemstone이 생태계의 대표 앱입니다.
호출이 다리를 건너는 방식
expect 함수 하나, 약 330개, 플랫폼마다 구현앱이 빌드되는 방식
python { } 블록.pyi 스텁 생성An app's life, end to end앱 하나의 일생
1. Write
A screen is a Python function. Widgets are Compose's own, reached through the bridge under their Kotlin names, with snake_case keywords.
from pythonx.compose.runtime import Composable, app, remember_saveable
from pythonx.compose.material3 import Text, Button
@app
@Composable
def App():
App.messages = messages = remember_saveable("Hello from Python")
Button(on_click=lambda: messages.setValue("clicked"),
content=lambda: Text(messages.getValue()))
2. Iterate in a notebook
With the app running, a notebook cell writes main.App.messages.setValue("changed") and the window updates within a frame. Redeclaring App in a cell replaces the screen. There is no update function: the screen is declared, and redeclaring is how it changes.
3. Make the hot parts fast
A function with full type annotations can be compiled by TypedPython into a native extension that keeps CPython's exact behaviour. A model can be loaded with torchnative through the Hugging Face API.
4. Build for every platform
The app's Gradle build has a python { } block. One build produces the Android APK, the iOS app, the desktop package and the web bundle, each with its interpreter, its Python code and its dependencies built for that target.
5. Ship and update
Libraries are published to PyPI; apps ship through the stores, and their Python code can be updated through FastTrack, pypackpack's fast path for app code. During development, hot reload sends changed Python to a running app.
1. 쓴다
화면은 Python 함수입니다. 위젯은 Compose 자신의 것이고, 다리를 통해 Kotlin 이름 그대로 닿으며, 키워드는 snake_case로 씁니다.
from pythonx.compose.runtime import Composable, app, remember_saveable
from pythonx.compose.material3 import Text, Button
@app
@Composable
def App():
App.messages = messages = remember_saveable("Hello from Python")
Button(on_click=lambda: messages.setValue("clicked"),
content=lambda: Text(messages.getValue()))
2. 노트북에서 다듬는다
앱이 실행 중일 때 노트북 셀에서 main.App.messages.setValue("changed")를 쓰면 한 프레임 안에 창이 바뀝니다. 셀에서 App을 다시 선언하면 화면이 바뀝니다. 업데이트 함수는 없습니다. 화면은 선언하는 것이고, 바꾸고 싶으면 다시 선언합니다.
3. 뜨거운 부분을 빠르게 한다
타입이 다 붙은 함수는 TypedPython이 CPython과 정확히 같은 동작을 지키는 네이티브 확장으로 컴파일합니다. 모델은 torchnative로 Hugging Face API 그대로 불러옵니다.
4. 모든 플랫폼용으로 빌드한다
앱의 Gradle 빌드에 python { } 블록이 있습니다. 빌드 한 번으로 Android APK, iOS 앱, 데스크톱 패키지, 웹 번들이 나오고, 각각 그 타깃용으로 빌드된 인터프리터, Python 코드, 의존성을 품습니다.
5. 배포하고 갱신한다
라이브러리는 PyPI로 배포하고, 앱은 스토어로 배포하며, 앱의 Python 코드는 pypackpack의 앱 코드 빠른 경로인 FastTrack으로 갱신할 수 있습니다. 개발 중에는 핫 리로드가 바뀐 Python을 실행 중인 앱에 보냅니다.
The projects프로젝트
Every project, its layer, its role and where it stands. Each name links to a page about its design.
| Project | Layer | Role | State and next release |
|---|---|---|---|
| python-multiplatform | Language and runtime | The bridge: embeds CPython, Kotlin to Python and Python to Kotlin calls, the binder, the Compose host | Desktop, Android, iOS working; web experimental. Next: free-threaded 3.15t, 11-30 |
| TypedPython | Language and runtime | Type gate in the build, ahead-of-time compiler from typed Python to CPython extensions | Compiler working on desktop; free-threaded code generation in progress. Next: M3, 11-30 |
| torchnative | Language and runtime | On-device machine learning: the PyTorch and transformers API over a Rust runtime | Generation, streaming and batching on CPU; 0.1.0b5 targeted for 2026-10-24 |
| pypackpack | Build and ship | Per-target dependency resolution, extension builds, bundles and deploys for the Python half of apps | 0.2.0 ready to publish; 0.3.0 (native level) targeted 2026-11-30 |
| toolchain | Build and ship | The python { } block in Gradle: interpreter staging, per-target dependencies, packaging, hot reload | Desktop and Android working; toolchain-lite 0.1.0 ready; plugin 1.0.0-alpha01 targeted 2026-11-30 |
| pythonx-compose | pythonx | Declarative UI in Python on real Compose: decorated composables, a declared app root, saved state | Lecture notebook runs end to end; 0.1.0a2 ready; 0.1.0b1 targeted 2026-11-20 |
| pythonx-concurrent | pythonx | Kotlin-style scopes, dispatchers and cancellation in Python, bridging asyncio and Kotlin coroutines | Specified; name reserved; implementation in the pythonx turn |
| pythonx-graphics | pythonx | A three.js replacement for Python apps, with scenes that agents can describe, ground, edit and replay | Specified; name reserved; implementation in the pythonx turn |
| pythonx-platform | pythonx | A thin Pythonic layer over multiplatform androidx device libraries | Intent recorded; name reserved; first Kotlin library planned |
| compose-multiplatform-core-extended | Foundation | Compose with AWT-free desktop windows on GraalVM native image and Kotlin/Native, Linux and MinGW targets, and a plugin fork that packages all three outputs | macOS and Linux windows working; Windows in progress; design-system libraries and OS notifications planned |
| Gemstone | Apps | The flagship app: multi-model local serving, OpenAI and Ollama APIs, chat on every platform | Server and desktop, web, Android app working; iOS builds; 1.1.0 next |
모든 프로젝트와 그 계층, 역할, 현재 위치입니다. 이름을 누르면 그 프로젝트의 설계를 설명하는 페이지로 갑니다.
| 프로젝트 | 계층 | 역할 | 상태와 다음 출시 |
|---|---|---|---|
| python-multiplatform | Language and runtime | 다리: CPython 임베드, 양방향 호출, 바인더, Compose 호스트 | 데스크톱, Android, iOS 동작, 웹 실험 단계. 다음: free-threaded 3.15t, 11-30 |
| TypedPython | Language and runtime | 빌드 안의 타입 게이트, 타입 붙은 Python을 CPython 확장으로 미리 컴파일 | 데스크톱에서 컴파일러 동작, free-threaded 코드 생성 진행 중. 다음: M3, 11-30 |
| torchnative | Language and runtime | 온디바이스 머신러닝: Rust 런타임 위의 PyTorch와 transformers API | CPU에서 생성, 스트리밍, 배칭. 0.1.0b5 목표 2026-10-24 |
| pypackpack | Build and ship | 앱의 Python 절반을 위한 타깃별 의존성 해석, 확장 빌드, 번들, 배포 | 0.2.0 게시 준비 완료, 0.3.0(native 레벨) 목표 2026-11-30 |
| toolchain | Build and ship | Gradle의 python { } 블록: 인터프리터 준비, 타깃별 의존성, 패키징, 핫 리로드 | 데스크톱과 Android 동작, toolchain-lite 0.1.0 준비, 플러그인 1.0.0-alpha01 목표 2026-11-30 |
| pythonx-compose | pythonx | 진짜 Compose 위의 Python 선언형 UI: 데코레이터 컴포저블, 선언된 앱 루트, 저장 상태 | 강의 노트북이 처음부터 끝까지 동작, 0.1.0a2 준비, 0.1.0b1 목표 2026-11-20 |
| pythonx-concurrent | pythonx | Python의 Kotlin식 스코프, 디스패처, 취소. asyncio와 Kotlin 코루틴을 잇습니다 | 스펙 완료, 이름 선점, 구현은 pythonx 차례 |
| pythonx-graphics | pythonx | Python 앱을 위한 three.js 대체, 에이전트가 설명하고 연결하고 고치고 재생하는 장면 | 스펙 완료, 이름 선점, 구현은 pythonx 차례 |
| pythonx-platform | pythonx | 멀티플랫폼 androidx 기기 라이브러리 위의 얇은 Python 층 | 의도 기록, 이름 선점, 첫 Kotlin 라이브러리 계획 |
| compose-multiplatform-core-extended | Foundation | GraalVM native image와 Kotlin/Native의 AWT 없는 데스크톱 창, Linux·MinGW 타깃, 세 출력을 패키징하는 플러그인 포크를 갖춘 Compose | macOS·Linux 창 동작, Windows 진행 중, 디자인 시스템 라이브러리와 OS 알림 계획 |
| Gemstone | Apps | 대표 앱: 로컬 다중 모델 서빙, OpenAI와 Ollama API, 모든 플랫폼의 채팅 | 서버와 데스크톱, 웹, Android 앱 동작, iOS 빌드 성공, 다음은 1.1.0 |
Principles원칙
- The original names, always
- A Kotlin name in Python means the original Kotlin:
androidx.composeis androidx. No namespace is ever renamed to look Pythonic, so documentation, search results and stack traces stay true. What changes is spelling inside a module: members and keyword arguments are also reachable in snake_case, beside their Kotlin names. - Built at build time, never discovered at run time
- Kotlin/Native has almost no reflection and a GraalVM native image is a closed world. Every path from Python into Kotlin is generated while the app builds, and the Kotlin compiler, not a string lookup, picks the method. The same choice makes calls fast and native images possible.
- Exposure is a blacklist
- Every public Kotlin declaration is reachable from Python unless it opts out. A whitelist would make Python a second-class citizen of every library.
- CPython, with CPython's meaning
- The interpreter is the reference one. When Python is compiled, the result must give the same answers CPython would, including overflow, exceptions, signals and thread switches. Speed is earned by proof, never by changing the rules.
- Free-threaded, and only free-threaded
- The interpreter moves to CPython 3.15t with no GIL on every platform, the web included, and there will be no GIL build to fall back to. Parallelism comes from threads, not sub-interpreters. Libraries that would turn the GIL back on are reported at build time.
- Declarative over imperative
- Screens, scenes and motion are declared. Redeclaring is how things change, which is also what makes notebooks and agents able to work on a running app.
- Platform features are written once, in Kotlin
- A device feature belongs in a multiplatform Kotlin library that Kotlin and Python apps both use. pythonx packages shape such libraries for Python and never reimplement them.
- Tests that can fail
- Every claim has a test that was seen failing before the code existed, and pixels where pixels are the claim. A check that cannot fail is not a check.
- 원래 이름 그대로
- Python에서 보이는 Kotlin 이름은 원래 Kotlin을 뜻합니다.
androidx.compose는 androidx입니다. Python처럼 보이려고 네임스페이스 이름을 바꾸는 일은 없어서 문서, 검색 결과, 스택 트레이스가 그대로 맞습니다. 바뀌는 것은 모듈 안의 표기입니다. 멤버와 키워드 인자는 Kotlin 이름 옆에서 snake_case로도 부를 수 있습니다. - 실행 중에 찾지 않고 빌드할 때 만든다
- Kotlin/Native에는 리플렉션이 거의 없고 GraalVM 네이티브 이미지는 닫힌 세계입니다. Python에서 Kotlin으로 가는 모든 경로를 앱이 빌드될 때 생성하고, 메서드는 문자열 검색이 아니라 Kotlin 컴파일러가 고릅니다. 이 선택이 호출을 빠르게 하고 네이티브 이미지를 가능하게 합니다.
- 노출은 블랙리스트
- 모든 public Kotlin 선언은 스스로 빠지지 않는 한 Python에서 닿습니다. 화이트리스트였다면 Python은 모든 라이브러리의 이등 시민이 됐을 것입니다.
- CPython과 CPython의 의미
- 인터프리터는 기준 구현입니다. Python을 컴파일할 때도 결과는 넘침, 예외, 시그널, 스레드 전환까지 CPython과 같은 답을 내야 합니다. 속도는 규칙을 바꿔서가 아니라 증명으로 얻습니다.
- free-threaded, 그것만
- 인터프리터를 웹을 포함한 모든 플랫폼에서 GIL 없는 CPython 3.15t로 옮기고, 되돌아갈 GIL 빌드는 두지 않습니다. 병렬성은 서브 인터프리터가 아니라 스레드에서 옵니다. GIL을 다시 켜는 라이브러리는 빌드할 때 알려 줍니다.
- 명령형보다 선언형
- 화면, 장면, 움직임을 선언합니다. 다시 선언하는 것이 바꾸는 방법이고, 그래서 노트북과 에이전트가 실행 중인 앱을 다룰 수 있습니다.
- 플랫폼 기능은 Kotlin으로 한 번
- 기기 기능은 Kotlin 앱과 Python 앱이 함께 쓰는 멀티플랫폼 Kotlin 라이브러리에 속합니다. pythonx 패키지는 그런 라이브러리를 Python에 맞게 다듬고, 다시 구현하지 않습니다.
- 실패할 수 있는 테스트
- 모든 주장에는 코드가 있기 전에 실패하는 것을 본 테스트가 있고, 화면이 주장이면 픽셀로 증명합니다. 실패할 수 없는 검사는 검사가 아닙니다.
The future we are designing설계하는 미래
Python without the GIL, on every device
Every platform, phones and browsers included, runs the free-threaded interpreter. We build the free-threaded CPython that Android, iOS and WebAssembly do not ship yet, and the web runs isolated by default so that browser threads are real threads. Python and Kotlin threads then run Python side by side, and compiled code declares itself safe to do so.
Fast Python without a second language
The reason people write C for Python is speed. TypedPython makes typed Python itself the fast path: compiled ahead of time so it runs on iOS and in native images, with CPython's exact semantics, parallel loops on free-threaded CPython, and objects that are never allocated when nothing can observe them. Where Rust is the right tool, pypackpack builds Rust crates into Python extensions for every target.
Concurrency that spans both languages
A Python coroutine can be scheduled by Kotlin: stepped by a Kotlin coroutine on any dispatcher, on JVM virtual threads, moved between threads between steps. Cancelling a Kotlin job cancels the Python task under it, and the other way round.
Graphics that agents can work on
Every 2D and 3D scene is a typed document: describable to a language model, queryable with spatial relations, grounded in pixels through an entity-id buffer, edited through validated and undoable transactions that also produce source patches, rendered headless and replayed. The same scene is drawn natively by Compose and Filament at the platform's frame rate.
Models where the user is
torchnative runs the models people already use through the API they already use, on CPU, Metal, Vulkan and NPUs, so an app can carry its model rather than call a server.
모든 기기에서 GIL 없는 Python
휴대폰과 브라우저를 포함한 모든 플랫폼이 free-threaded 인터프리터로 돕니다. Android, iOS, WebAssembly가 아직 제공하지 않는 free-threaded CPython은 우리가 직접 빌드하고, 웹은 기본으로 격리돼서 브라우저 스레드가 진짜 스레드가 됩니다. 그러면 Python 스레드와 Kotlin 스레드가 나란히 Python을 실행하고, 컴파일된 코드는 그래도 안전하다고 스스로 선언합니다.
두 번째 언어 없이 빠른 Python
사람들이 Python을 위해 C를 쓰는 이유는 속도입니다. TypedPython은 타입 붙은 Python 자체를 빠른 길로 만듭니다. 미리 컴파일해서 iOS와 네이티브 이미지에서 돌고, CPython과 정확히 같은 의미를 지키며, free-threaded CPython에서 루프를 병렬로 돌리고, 아무도 관측할 수 없는 객체는 만들지 않습니다. Rust가 맞는 도구인 곳에서는 pypackpack이 Rust 크레이트를 모든 타깃용 Python 확장으로 빌드합니다.
두 언어에 걸친 동시성
Python 코루틴을 Kotlin이 스케줄할 수 있습니다. Kotlin 코루틴이 어떤 디스패처에서든, JVM 가상 스레드 위에서도 한 단계씩 실행하고, 단계 사이에 스레드를 옮길 수 있습니다. Kotlin job을 취소하면 그 아래의 Python 태스크가 취소되고, 반대도 같습니다.
에이전트가 다룰 수 있는 그래픽스
모든 2D, 3D 장면은 타입이 있는 문서입니다. 언어 모델에게 설명할 수 있고, 공간 관계로 질의할 수 있고, 엔티티 ID 버퍼로 픽셀과 연결되고, 검증되고 되돌릴 수 있으며 소스 패치까지 내는 트랜잭션으로 고치고, 창 없이 렌더링하고 재생합니다. 같은 장면을 Compose와 Filament가 플랫폼 프레임 속도로 네이티브하게 그립니다.
사용자가 있는 곳의 모델
torchnative는 사람들이 이미 쓰는 모델을 이미 쓰는 API로 CPU, Metal, Vulkan, NPU에서 돌려서, 앱이 서버를 부르지 않고 모델을 품고 다닐 수 있게 합니다.
Roadmap로드맵
The projects are finished one at a time, in this order, each to a release whose central claim is usable in practice.
- torchnative 0.1.0b5: layout cleanup, Metal generation, automated releases.
- python-multiplatform with TypedPython: free-threaded 3.15t, the build gate by default, compiled modules shipped through pypackpack (target 2026-11-30).
- pypackpack 0.3.0 and the toolchain plugin 1.0.0-alpha01: native and mixed build levels, Cargo backend, a published plugin (target 2026-11-30).
- pythonx-compose 0.1.0b1: the whole lecture notebook from PyPI (target 2026-11-20).
- The other pythonx packages, specified and named today, and Gemstone 1.1.0.
프로젝트는 이 순서대로 하나씩, 핵심 주장이 실제로 쓸 수 있는 출시까지 마무리합니다.
- torchnative 0.1.0b5: 구조 정리, Metal에서의 생성, 자동 배포.
- python-multiplatform과 TypedPython: free-threaded 3.15t, 기본으로 켜진 빌드 게이트, pypackpack으로 배포되는 컴파일 모듈 (목표 2026-11-30).
- pypackpack 0.3.0과 toolchain 플러그인 1.0.0-alpha01: native와 mixed 빌드 레벨, Cargo 백엔드, 공개 배포된 플러그인 (목표 2026-11-30).
- pythonx-compose 0.1.0b1: 강의 노트북 전체를 PyPI에서 (목표 2026-11-20).
- 스펙과 이름을 확보해 둔 나머지 pythonx 패키지들, 그리고 Gemstone 1.1.0.
Glossary용어
- Downcall / upcall
- A call from Kotlin into Python, and from Python into Kotlin.
- Binder
- The part of python-multiplatform that makes Kotlin modules importable from Python under their own names.
- Artifact walker
- The Gradle plugin step that reads compiled jars and klibs and generates the Kotlin source of their binding table.
- Free-threaded (3.15t)
- The CPython build without the global interpreter lock;
tmarks it in version names. - abi3t
- CPython 3.15's stable ABI for free-threaded builds (PEP 803): one extension wheel across versions.
- pythonx
- Python language extensions, in the spirit of androidx and kotlinx; one shared namespace package.
- ppp, tcl
- The commands of pypackpack and of toolchain-lite.
- FastTrack
- pypackpack's fast path for shipping code updates to apps.
- downcall / upcall
- Kotlin에서 Python으로의 호출, Python에서 Kotlin으로의 호출.
- 바인더
- Kotlin 모듈을 원래 이름 그대로 Python에서 import하게 해 주는 python-multiplatform의 부분.
- 아티팩트 워커
- 컴파일된 jar와 klib을 읽어 바인딩 표의 Kotlin 소스를 생성하는 Gradle 플러그인 단계.
- free-threaded (3.15t)
- 전역 인터프리터 락이 없는 CPython 빌드. 버전 이름의
t가 표시입니다. - abi3t
- free-threaded 빌드를 위한 CPython 3.15의 안정 ABI(PEP 803). 확장 wheel 하나를 여러 버전에서 씁니다.
- pythonx
- androidx, kotlinx와 같은 정신의 Python 언어 확장. 하나의 공유 네임스페이스 패키지입니다.
- ppp, tcl
- pypackpack과 toolchain-lite의 명령.
- FastTrack
- 앱에 코드 업데이트를 빠르게 보내는 pypackpack의 경로.