Giter VIP home page Giter VIP logo

Comments (18)

vvlevchenko avatar vvlevchenko commented on May 23, 2024 2

here you can find fork of public kotlin-native project enriched with gradle build (it macish at this stage, but enough to illustrate how to modify for your platform)

from kotlin-native.

napperley avatar napperley commented on May 23, 2024 2

@olonho Will there be an IntelliJ community plugin for koltin native? (it might seem selfish) Because they only work I do with IntelliJ IDE would be to build some OSS for elementary os using gtk bindings.

As @harisvsulaiman has mentioned above some major Linux distros (eg Linux Mint) may want to use Kotlin Native to develop supporting GUI tools/utilities. If IntelliJ Community edition doesn't support Kotlin Native then that is likely to put in a barrier (show stopper), which prevents Linux distros from using Kotlin Native (think licensing issues with tooling).

  • How accessible is Kotlin Native going to be for a software developer/student/enthusiast in regards to tooling?
  • Will IntelliJ be an IDE for Kotlin Native development?
  • Is it true that JetBrains are working on developing a new Kotlin Native IDE (does it support all major desktop platforms - Linux, Windows, MacOS)?
  • Have JetBrains considered the Linux desktop where it has significant market share in some niche markets (eg 3D modelling, professional movie making, embedded software development ...), and how Kotlin Native (including tooling) fits into that?

from kotlin-native.

olonho avatar olonho commented on May 23, 2024 1

The typeOf problem was recently fixed, IIRC. Also commercial IDE for Kotlin/Native is being considered.

from kotlin-native.

Scellow avatar Scellow commented on May 23, 2024 1

I also hope there will be a plugin for IDEA or CLion for people who don't need the whole multiplatform thing and just want to develop with kotlin native, similar to the Rust/Swift one just basic stuff

from kotlin-native.

napperley avatar napperley commented on May 23, 2024 1

@Scellow - Hopefully if a IntelliJ plugin is produced then it can be used in the Community edition, not just the Ultimate edition. Somehow I think if some of the major Linux distros are involved with Kotlin Native then they WILL want Kotlin Native support in IntelliJ Community edition.

from kotlin-native.

vvlevchenko avatar vvlevchenko commented on May 23, 2024

We use intellij gradle integration in development. you can try yourself import gradle project from our samples. This the only method known for today, later IDE will support kotlin naive more natively and smooth.

from kotlin-native.

wenerme avatar wenerme commented on May 23, 2024

I can import the sample, but how to setup kotlin-native libs and autocomplete ?

from kotlin-native.

vvlevchenko avatar vvlevchenko commented on May 23, 2024

you can create similar gradle build script for your project and bindings to your library appears in your idea project immediately after cinteropt phase of build completed.

from kotlin-native.

wenerme avatar wenerme commented on May 23, 2024

😳
Can you setup a sample project with intellij and post the zip file here ? or create a demo repo for beginners.Many thanks, 🙏

from kotlin-native.

vvlevchenko avatar vvlevchenko commented on May 23, 2024

if you need more assistance please fill free to reopen issue

from kotlin-native.

wenerme avatar wenerme commented on May 23, 2024

I try to compile the latest but got this

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':tools:helpers:compileClasspath'.
> Could not find org.jetbrains.kotlin:kotlin-compiler:1.1-20170409.165958-449.
  Searched in the following locations:
      https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-compiler/1.1-SNAPSHOT/kotlin-compiler-1.1-20170409.165958-449.pom
      https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-compiler/1.1-SNAPSHOT/kotlin-compiler-1.1-20170409.165958-449.jar
      http://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/kotlin/kotlin-compiler/1.1-SNAPSHOT/kotlin-compiler-1.1-20170409.165958-449.pom
      http://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/kotlin/kotlin-compiler/1.1-SNAPSHOT/kotlin-compiler-1.1-20170409.165958-449.jar
  Required by:
      project :tools:helpers

from kotlin-native.

wenerme avatar wenerme commented on May 23, 2024

@vvlevchenko Finally I compiled konan-sfml, but still can not run this

$ ./HelloSfml.kexe
Uncaught exception from Kotlin's main: Throwable: typeOf() is called with erased argument
        at 0   HelloSfml.kexe                      0x000000010b0492f9 kfun:kotlin.Throwable.<init>(kotlin.String?;kotlin.Throwable?)Reference + 121
        at 1   HelloSfml.kexe                      0x000000010b0594ca kfun:kotlinx.cinterop.readValueT.()Reference + 58
        at 2   HelloSfml.kexe                      0x000000010b044653 kfun:sfml.sfColor_fromRGB$lambda-164$bound-175#internal + 419
        at 3   HelloSfml.kexe                      0x000000010b0581b0 kfun:kotlinx.cinterop.memScoped(kotlin.Function1<kotlinx.cinterop.MemScope,GENERIC>)Reference + 352
        at 4   HelloSfml.kexe                      0x000000010b04441b kfun:sfml.sfColor_fromRGB(kotlin.Byte;kotlin.Byte;kotlin.Byte)Reference + 491
        at 5   HelloSfml.kexe                      0x000000010b043499 Konan_main + 2889
        at 6   libdyld.dylib                       0x00007fffbf71e255 start + 1

from kotlin-native.

Scellow avatar Scellow commented on May 23, 2024

@vvlevchenko Added macOS support in original repo perses-games/konan-sfml#1

I was looking for sfml lib, thanks for mentioning it :D :D kotlin is the best language ever, thanks for your hard work <3

from kotlin-native.

perses-games avatar perses-games commented on May 23, 2024

@wenerme To work around the typeOf issue, I used the command line build (see: konan-sfml).

To have autocomplete in intellij I created a kotlin jvm project and added the Runtime.jar to the dependencies and the interop kotlin files to the sources (don't link the gradle build file). And then I build with the build script, this works for me. I'll switch to gradle once the typeOf issue is fixed there.

from kotlin-native.

 avatar commented on May 23, 2024

@perses-games Can't seem to get autocomplete to work for generated koltin. I don't know what I'm doing wrong.Can you describe the steps taken to import kotlin native samples?

from kotlin-native.

 avatar commented on May 23, 2024

@olonho Will there be an IntelliJ community plugin for koltin native? (it might seem selfish) Because they only work I do with IntelliJ IDE would be to build some OSS for elementary os using gtk bindings.

from kotlin-native.

perses-games avatar perses-games commented on May 23, 2024

@harisvsulaiman I added the generated file as a source file in the project settings in intellij. If you take a look at the settings in the sfml example project (https://github.com/perses-games/konan-sfml) you will see that the sfml.kt file is added to the project as a source file.

from kotlin-native.

 avatar commented on May 23, 2024

from kotlin-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.