https://kotlinlang.org logo
#embedded-kotlin
Title
# embedded-kotlin
p

Piotr Krzemiński

11/21/2021, 2:20 PM
hi folks, FYI: together with @SerVB we work on transpiling Kotlin to Python (technically, a new Kotlin backend). Using Kotlin on embedded systems is a great use case for this project - I realized it myself, when I started playing with my STM32-based board 🙂 if you want to learn more and/or support us, please head to: • the repo: https://github.com/krzema12/kotlin-python • related forum thread: https://discuss.kotlinlang.org/t/idea-python-backend/19852 • related YouTrack issue: https://youtrack.jetbrains.com/issue/KT-34074 • related Slack channels: #python and #python-contributors To sum up the status: it's not usable yet, but we got some nice momentum and with our current pace and about a year, it might become a real thing!
👀 1
👍 1
l

louiscad

11/21/2021, 2:42 PM
Hello! Interesting project. Being not so familiar with embedded systems yet, I'm wondering what made you choose to transpile Kotlin to python rather than to C++, C, Rust, or another low-level language. Can you tell ? 🙂
👍 1
p

Piotr Krzemiński

11/21/2021, 2:47 PM
hi, thanks! see the mentioned YouTrack issue, it summarizes the use cases that I came up with so far
👀 2
if you mean only the context of embedded, it's just a use case of the Kotlin/Python that one may prefer over using native binaries. From hard advantages, I see so far that the app will be portable
several days ago I realized it's not that easy to use Kotlin on my STM32-based board (see the thread), and then I got a revelation that there's MicroPython + soon Kotlin/Python 🙂 that's the whole story so far
l

louiscad

11/21/2021, 2:51 PM
Being compatible with LLVM and sharing code with Kotlin multiplatform is another way of making the app "portable"
Python and MicroPython are different, aren't they? Or does supporting Kotlin to Python means supporting Kotlin to MicroPython?
BTW, read the YouTrack issue, makes a lot of sense, I'm surprised there wasn't more publicity about this issue.
👍 1
👍🏻 1
p

Piotr Krzemiński

11/21/2021, 3:00 PM
Yeah, Micropython from what I saw is some simple subset, and I just got this idea we can target it (as well) in Kotlin/Python
c

corneil

12/01/2021, 11:15 AM
STM32 is ARM 32 bit. It should be less work to produce a nativeArm32 target if you use abdroidNativeArm32 as a starting point
4 Views