-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kotlin Native Support #571
Comments
Right now, only the HTTP Client supports Kotlin/Native |
Right now, the HTTP client supports osx, and macos. I read Linux is being considered. But windows isn't mentioned anywhere... Is there any plans to support windows? I am building a cross-platform desktop program that targets macos and windows, and just want to know if I can expect windows to be supported in the future. I would rather not waste my time using ktor's http client if windows support is not in the plans. |
Can the 'ktor-client-core' be published for other native targets? So at least, custom client engines can be made. |
Any updates on it? Can we now create ktor server-side app for native ? |
@e5l Hey, just saw that this issue was added to 1.1.5 milestone that is closed. Does it mean that Ktor support Kotlin Native? (as the current version is 1.2.0) |
Hi there :) I'm in love with Kotlin Multiplatform! But Ktor server support is blocking for us to use it in our company's product. Is it something that is still planned or this is something that appears impossible in the end ? I can (try to) give an hand on this, is this possible to have an overview of what is missing or what are the problematics ? |
ktor server MPP is planned for 1.4.0 |
Still waiting on MPP websockets 🤞 |
and http3 =) |
Ktor Client is available for linuxX64 but not for the other Linux targets (linuxArm32Hfp, linuxArm64 etc) :( . |
This would make for a very interesting serverless implementation in combination with things like openfaas or rio.io |
I think this issue doesn't receive the attention it is worth. If it was really possible to decouple ktor-server and its modules from Java, it would be groundbreaking. The biggest problem with Java web frameworks is their slow startup time, because the JVM often takes seconds to start up. If K/N ktor-server would be a thing, I am pretty sure that many developers would consider porting existing Kotlin projects that depend on http4k, Spring, Vert.x or similar to ktor which would give them a dramatic performance boost. |
If Ktor Server was ported to Kotlin Native (supporting the linux targets) would Ktor be suitable for Serverless via OpenFaaS? What would the performance footprint for Ktor Server look like on Kotlin Native compared to Go lang? Currently there isn't a single cloud provider (eg AWS) that provides Kotlin Native support. Having Ktor Server ported to Kotlin Native would help change that. Many cloud providers except for GCP (Google Cloud Platform) are paying lip service to Kotlin support (aka examples/demos are presented but no official Kotlin support is provided). GCP Kotlin support is restricted to Kotlin JVM only, and doesn't extend to Kotlin Native unless Google have some future plans to extend Kotlin support. |
@napperley at the moment, K/N has poor performance as the dev team primarily focused on compatibility. It will take a few iterations until it is comparable to the more mature Go let alone C. In the meantime, though, it would be great to start with the porting of ktor so that when K/N is performant, ktor is ready to be used. |
I also think there's a lot of opportunity for kotlin native/ktor in the serverless space and to compete with things like graalvm. I get that graalvm has different promises than kotlin native as it will transpile more jvm related stuff to native. But still it seems very painful, slow and complex, and also requires changes in the jvm related frameworks. Offering the combination of native performance/memory usage, ktor and a familiar language might be able to pull over a lot of developers out of the jvm/graalvm space. |
@krishofmans exactly! I am currently working with Micronaut because it's specifically made to be compiled as Graal native-image and it's extremely tedious! |
I just realized that because ktor seems to rely on reflection a lot, porting it will require significant changes of the whole application pipeline. K/N currently supports reflection only to a very limited extent. |
Perhaps that's just an opportunity for K/N to also further it's features. Since reflection is basically a metadatamodel of the code that can be modified at runtime. It could be seen as an api around method/field lookup tables with some additional metadata and perhaps it will become more widely supported in K/N this way. I know that it's a lot more complex and a lot of work will go into it to support it, but still looks like something that could be worth it if it would also enable porting over other jvm kotlin based frameworks over to the native space. |
Is there another issue or PR for this? Still planned for 1.4? |
WIP in |
Is the WIP referring to the Ktor Server implementation?
…On Tue, 21 Apr 2020 at 22:38, Leonid Stashevsky ***@***.***> wrote:
WIP in e5l/cio-common. Yep, the implementation is in progress.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#571 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA272Z2HMXMNJBPP5YSPB6DRNVZRHANCNFSM4FT6VNBA>
.
|
I am not in a hurry, I want to use native servers for a testing framework for iOS and Android I am working on. I have a solution working with okhttp mocks and Objective-C server, under one interface in Kotlin MP. Just interested if there is a way, or some rough ETA, where I could switch that to Ktor Server on Kotlin MP. |
I'm looking forward to this. I'm in a state of changing my tech stack and kotlin is one of them (I want to leave from JVM, golang is another selection). But for me, still kotlin with spring boot apps is the way until a native approach arises. Trying graalvm native support with spring was a failing step. If ktor manages to be native, for sure this will be the way to go for kotlin APIs into docker from scratch. |
Is there any updates ? (or news) |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I have ktor server with cio working as a native image - I posted this YT issue https://youtrack.jetbrains.com/issue/KTOR-965 |
But this won't help if you want to use Ktor server on your iOS app. |
According to release notes it is in 2.0.0-beta-1. With CIO i get no visible errors in output. |
@Nailik I think this issue has been fixed https://youtrack.jetbrains.com/issue/KTOR-3653 |
I think this isn't fixed until I can create native Windows server. The documentation doesn't give any hint why Windows target support is dropped. Can't we take the |
How does it look now?Is there support for Windows(mingwX64) and/or LinuxArmX64? Any Updates? |
btw this issue is freaking 5 years old |
@Adrian8115, what modules do you want to know the support for? |
I want to develop a server software in kotlin which needs native multiplatform udp support... The thing is, it looks like it's not supported on the most important platforms: Windows X64_86 and Linux Arm And that is a huge deal-breaker sadly |
This seems to be supported natively: https://ktor.io/docs/servers-raw-sockets.html |
Hello !
Does Ktor support Kotlin Native for now (using Netty)? I saw few comments in JetBrains Blog, but can't find any detailed information about it.
Thank you !
The text was updated successfully, but these errors were encountered: