{"id":18593645,"url":"https://github.com/silenium-dev/jni-utils","last_synced_at":"2026-02-26T15:02:35.026Z","repository":{"id":250317997,"uuid":"834071687","full_name":"silenium-dev/jni-utils","owner":"silenium-dev","description":"Kotlin utils for platform detection and JNI","archived":false,"fork":false,"pushed_at":"2025-01-27T19:03:35.000Z","size":165,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T16:38:55.648Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silenium-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-26T11:01:54.000Z","updated_at":"2025-01-07T12:35:26.000Z","dependencies_parsed_at":"2024-10-22T11:25:46.399Z","dependency_job_id":null,"html_url":"https://github.com/silenium-dev/jni-utils","commit_stats":null,"previous_names":["silenium-dev/jni-utils"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenium-dev%2Fjni-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenium-dev%2Fjni-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenium-dev%2Fjni-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenium-dev%2Fjni-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silenium-dev","download_url":"https://codeload.github.com/silenium-dev/jni-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239372315,"owners_count":19627778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T01:13:08.278Z","updated_at":"2025-11-02T03:30:31.751Z","avatar_url":"https://github.com/silenium-dev.png","language":"C++","readme":"# jni-utils\n\nA Kotlin library for platform specific loading of jni bindings.\n\n## Usage\n\nYou can add the dependency to your project as follows:\n\n```kotlin\nrepositories {\n    maven(\"https://reposilite.silenium.dev/releases\") {\n        name = \"silenium-releases\"\n    }\n}\ndependencies {\n    implementation(\"dev.silenium.libs.jni:jni-utils:0.1.0\")\n}\n```\n\n### Example\n\nFile structure:\n```\nsrc\n└── main\n    ├── kotlin\n    │   └── Main.kt\n    └── resources\n        └── lib\n            ├── linux-x86_64\n            │   └── libnative.so\n            └── windows-x86_64\n                └── native.dll\n```\n\n`Main.kt`\n```kotlin\nimport dev.silenium.libs.jni.NativeLoader\nimport java.nio.file.Path\n\nfun main() {\n    // Loads from linux-x86_64/libnative.so on Linux x86_64\n    // Loads from windows-x86_64/native.dll on Windows x86_64\n    val result: Result\u003cPath\u003e = NativeLoader.loadLibraryFromClasspath(baseName = \"native\", basePath = \"lib\")\n    if (result.isFailure) { // if file not found or failed to load\n        println(\"Failed to load library: ${result.exceptionOrNull()}\")\n        return\n    }\n    val path = result.getOrThrow() // path to the extracted library file\n    println(\"Loaded library: $path\")\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilenium-dev%2Fjni-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilenium-dev%2Fjni-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilenium-dev%2Fjni-utils/lists"}