{"id":37029536,"url":"https://github.com/stardust-enterprises/yanl","last_synced_at":"2026-01-14T03:33:25.909Z","repository":{"id":40537957,"uuid":"430244389","full_name":"stardust-enterprises/yanl","owner":"stardust-enterprises","description":"Yet Another Native Loader for the JVM.","archived":true,"fork":false,"pushed_at":"2022-08-10T06:36:24.000Z","size":382,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"trunk","last_synced_at":"2024-04-22T11:19:07.579Z","etag":null,"topics":["java","jvm","kotlin","native"],"latest_commit_sha":null,"homepage":"https://stardust-enterprises.github.io/yanl","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stardust-enterprises.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}},"created_at":"2021-11-21T01:05:21.000Z","updated_at":"2023-12-07T15:21:39.000Z","dependencies_parsed_at":"2022-08-27T04:34:29.421Z","dependency_job_id":null,"html_url":"https://github.com/stardust-enterprises/yanl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stardust-enterprises/yanl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardust-enterprises%2Fyanl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardust-enterprises%2Fyanl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardust-enterprises%2Fyanl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardust-enterprises%2Fyanl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stardust-enterprises","download_url":"https://codeload.github.com/stardust-enterprises/yanl/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stardust-enterprises%2Fyanl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","jvm","kotlin","native"],"created_at":"2026-01-14T03:33:25.180Z","updated_at":"2026-01-14T03:33:25.894Z","avatar_url":"https://github.com/stardust-enterprises.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yanl - yet another native loader\n[![Build][badge-github-ci]][yanl-gradle-ci] [![Maven Central][badge-mvnc]][yanl-mvnc]\n\nyet another native library loader and extractor for the [JVM][jvm], written in [Kotlin][kotlin].\n\n# why\n\nother libraries simply do not fit my needs and/or are not as expandable/configurable as I would like.\n\n# how use\n\nyou can import [yanl][yanl] from [maven central][mvnc] just by adding it to your dependencies:\n\n## gradle\n\n```kotlin\ndependencies {\n    implementation(\"fr.stardustenterprises:yanl:{VERSION}\")\n}\n```\n\n## maven\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003efr.stardustenterprises\u003c/groupId\u003e\n    \u003cartifactId\u003eyanl\u003c/artifactId\u003e\n    \u003cversion\u003e{VERSION}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# how work\n\nthis library can act as a replacement from your standard `System.loadLibrary`, with a bit more configuration setup.\n\nconsider the following example:\n\n```java\npackage your.project;\n\npublic class Program {\n    public static void main(String[] args) {\n        // requires the native file to be in path\n        System.loadLibrary(\"coollib\");\n\n        // do stuff...\n    }\n}\n```\n\nthis would require the library file to be somewhere on the `PATH` of the host machine.\n\none way of getting around this problem would be to extract the library from the jar archive to a known folder, then to\nload it. this approach works but also requires extracting and loading the correct library for the correct processor\narchitecture (arch) and operating system (OS).\n\nand this is where [yanl][yanl] performs: we take care of platform detection, library extraction and location with ease.\n\n[//]: # (and even let you customize which version of the library you would\n want to load based on processor flags)\n\ntaking back that previous example, let us see an extensive configuration:\n\n```java\npackage your.project;\n\nimport fr.stardustenterprises.yanl.NativeLayout;\nimport fr.stardustenterprises.yanl.NativeLoader;\nimport fr.stardustenterprises.yanl.PlatformContext;\nimport fr.stardustenterprises.yanl.TempExtractor;\n\npublic class Program {\n    private static final NativeLoader nativeLoader =\n        new NativeLoader.Builder()\n\n        // this tells the loader to look for libraries\n        // in the /META-INF/natives directory\n        .root(\"/META-INF/natives\")\n\n        // this sets where the loader is going\n        // to look for your libraries. you can\n        // check NativeLayout for default layouts\n        .layout(NativeLayout.HIERARCHICAL_LAYOUT)\n\n        // you can also only specify the layout's\n        // pattern, and it will automagically create\n        // it for you\n        //.layout(\"{os}/{arch}/{name}\")\n\n        // set the extractor instance,\n        // see the Extractor interface\n        .extractor(new TempExtractor())\n\n        // set the context instance,\n        // see the Context interface\n        .context(new PlatformContext())\n\n        // create the loader\n        .build();\n\n    public static void main(String[] args) {\n        // replaces System.loadLibrary\n        nativeLoader.loadLibrary(\"coolLib\");\n\n        // do cooler stuff...\n    }\n}\n```\n\n***Note:** the above example is the **default** configuration for the [NativeLoader][blob-native-loader], so you could\nreplace the entire building process with the following:*\n\n```java\npackage your.project;\n\nimport fr.stardustenterprises.yanl.NativeLoader;\n\npublic class Program {\n    private static final NativeLoader defaultLoader =\n        new NativeLoader.Builder().build();\n}\n```\n\n# troubleshooting\n\nif you ever encounter any problem **related to the library**, you can [open an issue][new-issue] describing what the\nproblem is. please, be as precise as you can, so that we can help you asap. we are most likely to close the issue if it\nis not related to our work.\n\n# contributing\n\nyou can contribute by [forking the repository][fork], making your changes and [creating a new pull request][new-pr]\ndescribing what you changed, why and how.\n\n# licensing\n\nthis project is under the [ISC license][blob-license].\n\n\n\u003c!-- Links --\u003e\n\n[jvm]: https://adoptium.net \"adoptium website\"\n\n[kotlin]: https://kotlinlang.org \"kotlin website\"\n\n[yanl]: https://github.com/stardust-enterprises/yanl \"yanl github repository\"\n\n[fork]: https://github.com/stardust-enterprises/yanl/fork \"fork this repository\"\n\n[new-pr]: https://github.com/stardust-enterprises/yanl/pulls/new \"create a new pull request\"\n\n[new-issue]: https://github.com/stardust-enterprises/yanl/issues/new \"create a new issue\"\n\n[mvnc]: https://repo1.maven.org/maven2/ \"maven central website\"\n\n[yanl-mvnc]: https://maven-badges.herokuapp.com/maven-central/fr.stardustenterprises/yanl \"maven central repository\"\n\n[yanl-gradle-ci]: https://github.com/stardust-enterprises/yanl/actions/workflows/gradle-ci.yml \"gradle ci workflow\"\n\n[blob-license]: https://github.com/stardust-enterprises/yanl/blob/trunk/LICENSE \"LICENSE source file\"\n\n[blob-native-loader]: https://github.com/stardust-enterprises/yanl/blob/trunk/src/main/kotlin/fr/stardustenterprises/yanl/NativeLoader.kt \"NativeLoader.kt source file\"\n\n\u003c!-- Badges --\u003e\n\n[badge-mvnc]: https://maven-badges.herokuapp.com/maven-central/fr.stardustenterprises/yanl/badge.svg \"maven central badge\"\n\n[badge-github-ci]: https://github.com/stardust-enterprises/yanl/actions/workflows/gradle-ci.yml/badge.svg?branch=trunk \"github actions badge\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardust-enterprises%2Fyanl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstardust-enterprises%2Fyanl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstardust-enterprises%2Fyanl/lists"}