kitgit

tirbofish/dropbear · diff

9a88505 · Thribhu K

refactor + wip: changed to a more "abstract" component querying system, allowing for other developers to create their own components. also shuffled the code, and now got the commonMain working (to a documentable stage). todo: - implement jvmMain functions, implement JNI rust code and test to see if physics is working - if physics is working: - implement nativeLibMain and native rust code - if physics is NOT working: - fix up PhysicsState in rust and kotlin and see what the issue is, then resolve. - fix up magna-carta to support new system will i hit my deadline (basic physics working by new years)??? hopefully so...

Unverified

diff --git a/build.gradle.kts b/build.gradle.kts
index 5f5eac2..91cb7c9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -32,18 +32,12 @@ val libPathProvider = provider {
         layout.projectDirectory.file("libs/$libName").asFile
     )
 
-    val foundFile = candidates.firstOrNull { it.exists() }
-    if (foundFile != null) {
-        foundFile.absolutePath
-    } else {
-        println("No Rust library exists")
-        ""
-    }
+    candidates.firstOrNull { it.exists() }?.absolutePath ?: ""
 }
 
 kotlin {
     jvm {
-        withJava()
+
     }
 
     val nativeTarget = when {
@@ -81,19 +75,16 @@ kotlin {
             binaries {
                 sharedLib {
                     baseName = "dropbear"
-
                     if (isLinux || isMacOs) {
                         linkerOpts("-L$nativeLibDir", "-l$nativeLibNameForLinking", "-Wl,-rpath,\\\$ORIGIN")
                     } else if (isMingwX64) {
-                        val importLibName = "$nativeLibNameForLinking.dll.lib"
-                        val importLibPath = file("$nativeLibDir/$importLibName").absolutePath
-                        linkerOpts(importLibPath)
+                        linkerOpts(file("$nativeLibDir/$nativeLibNameForLinking.dll.lib").absolutePath)
                     }
                 }
             }
         }
     } else {
-        println("Skipping native target configuration due to missing library path.")
+        println("WARNING: Rust library not found. Native compilation will skip linking against eucalyptus_core.")
         nativeTarget.apply {
             compilations.getByName("main") {
                 cinterops {
@@ -120,8 +111,9 @@ kotlin {
 
         jvmMain {

Large diffs are not rendered by default. Showing the first 50 of 6155 lines. Show full diff