I’m very excited about Kotlin/Native and want to use it to create a small Hello World web-based application in a cross platform way. I found the gtk-based kotlin/native example but it is not exactly what I want. It would be great if we could create a cross platform API to show a web page in a window with JavaScript supported using embedded webkit (so web-based UI will be possible with React, Vue, Vue Material etc). The idea is something like nwjs or Electron but in Kotlin/Native
I think what you want would be a bit of work, if you just want to have an electron like app you need to implement for each platform and use their native web framework (webkit on macOS, UWP on Windows and on Linux maybe embed in your library an web engine like webkit) then build a bridge or some kind of way to interact with the html/css.
If you use this approach your apps will be smaller on Windows and macOS but on Linux you will have almost the same overhead of electron, just b/c you need to embed the webkit/chromium on it.
May you start on Windows that will be easier b/c its well documented
Not sure about this idea, unless it’s something specific that require underlying native platform features without using C/C++ or similar lanugages. There are lots of ways to embed JVM, which allow you to stay on your rails. That’s my opinion.
Thank you for the info! It looks like the APIs are not ready for cross platform development yet and any serious work will require platform specific APIs. What do you think? Do you find Kotlin/Native is useful for your work?
Indeed you could use the webview of javafx or javafx directly to build the UI (check tornadofx).
But every crossplatform implementation requires platform specific code for each platform, in this case or you could just embed chromium.
I think you want an easy solution to do a crossplatform app, right now theres no such proyecto that Im aware in the kotlin native ecosystem, but I was thinking a while ago about this kind of approach, its just kotlin native isnt production ready and the tools to work with are experimental (the clion support comes a week ago or something like that).
I have a “good” idea here, how about use an embedded server as a local server and create a webapps that interact with the embedded server via Rest. The requirement here is the users must have a modern browser preinstalled.