{"id":46296625,"url":"https://github.com/matrixdev/gradleandroidrustplugin","last_synced_at":"2026-03-04T10:02:25.019Z","repository":{"id":146559609,"uuid":"606011187","full_name":"MatrixDev/GradleAndroidRustPlugin","owner":"MatrixDev","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-16T17:36:36.000Z","size":352,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-16T23:45:34.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MatrixDev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-24T11:54:21.000Z","updated_at":"2026-02-16T17:35:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"837e460a-1e08-4878-957b-e5517121f4b5","html_url":"https://github.com/MatrixDev/GradleAndroidRustPlugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MatrixDev/GradleAndroidRustPlugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixDev%2FGradleAndroidRustPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixDev%2FGradleAndroidRustPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixDev%2FGradleAndroidRustPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixDev%2FGradleAndroidRustPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatrixDev","download_url":"https://codeload.github.com/MatrixDev/GradleAndroidRustPlugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatrixDev%2FGradleAndroidRustPlugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-04T10:02:24.256Z","updated_at":"2026-03-04T10:02:25.012Z","avatar_url":"https://github.com/MatrixDev.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AndroidRust Gradle Plugin\n\nThis plugin helps with building Rust JNI libraries with Cargo for use in Android projects.\n\nLink to the plugin on the gradle repository:\nhttps://plugins.gradle.org/plugin/io.github.MatrixDev.android-rust\n\n# Usage\n\nAdd dependencies to the root `settings.gradle.kts` file:\n\n```kotlin\nrepositories {\n    // ...\n    maven(\"https://plugins.gradle.org/m2/\")\n}\n```\n\nAdd dependency record to `libs.versions.toml` file:\n\n```toml\n[plugins]\nandroid-rust = { id = \"io.github.MatrixDev.android-rust\", version = \"0.6.0\" }\n```\n\nAdd dependencies to the root `build.gradle.kts` file:\n\n```kotlin\nplugins {\n    alias(libs.plugins.android.rust) apply false\n}\n```\n\nAdd plugin to the module's `build.gradle.kts` file:\n\n```kotlin\nplugins {\n    alias(libs.plugins.android.rust)\n}\n```\n\nAdd `androidRust` configuration:\n\n```kotlin\nandroidRust {\n    module(\"rust-library\") {\n        path = file(\"src/rust_library\")\n    }\n}\n```\n\n# Additional configurations\n\nThis is the list of some additional flags that can be configured:\n\n```kotlin\nandroidRust {\n    // MSRV, plugin will update rust if installed version is lower than requested\n    minimumSupportedRustVersion = \"1.62.1\"\n\n    module(\"rust-library\") {\n        // path to your rust library\n        path = file(\"src/rust_library\")\n\n        // default rust profile\n        profile = \"release\"\n\n        // default abi targets\n        targets = listOf(\"arm\", \"arm64\")\n\n        // \"debug\" build type specific configuration\n        buildType(\"debug\") {\n            // use \"dev\" profile in rust\n            profile = \"dev\"\n        }\n\n        // \"release\" build type specific configuration\n        buildType(\"release\") {\n            // run rust tests before build\n            runTests = true\n\n            // build all supported abi versions\n            targets = listOf(\"arm\", \"arm64\", \"x86\", \"x86_64\")\n        }\n    }\n\n    // more than one library can be added \n    module(\"additional-library\") {\n        // ...\n    }\n}\n```\n\n# AGP Version Compatibility\n\n| Plugin Version | AGP Version | Status                      |\n|----------------|-------------|-----------------------------|\n| 0.6.0          | 9.0+        | Active development          |\n| 0.5.0          | 7.x – 8.x   | Maintained (bug fixes only) |\n\n# Development support\n\nPlugin will check for a magic property `android.injected.build.abi` set by Android Studio when\nrunning application on device. This will limit ABI targets to only required by the device and\nshould speedup development quite a bit.\n\nIn theory this should behave the same as a built-in support for the NdkBuild / CMake.\n\n# Goals\n\n- Building multiple rust libraries with ease\n- Allow builds to be configurable for common scenarios\n\n# Non-goals\n\n- Supporting all Gradle versions\n- Allow builds to be configurable for exotic scenarios\n\n# IDE Enviroment PATH Workaround\n\nOn some systems (notably MacOS) gradle task might fail to locate rust binaries. At this moment there\nare multiple issues/discussions for both gradle and IntelliJ IDEs.\n\nTo solve this problem cargo path can be provided in `local.properties` file:\n\n```properties\nsdk.dir=...\ncargo.bin=/Users/{user}/.cargo/bin/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixdev%2Fgradleandroidrustplugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatrixdev%2Fgradleandroidrustplugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatrixdev%2Fgradleandroidrustplugin/lists"}