{"id":13566311,"url":"https://github.com/mozilla/uniffi-rs","last_synced_at":"2025-05-13T18:04:56.687Z","repository":{"id":36954702,"uuid":"271210496","full_name":"mozilla/uniffi-rs","owner":"mozilla","description":"a multi-language bindings generator for rust","archived":false,"fork":false,"pushed_at":"2025-05-05T19:48:27.000Z","size":65657,"stargazers_count":3309,"open_issues_count":255,"forks_count":255,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-06T17:14:19.620Z","etag":null,"topics":["ffi-layer","rust-crate"],"latest_commit_sha":null,"homepage":"https://mozilla.github.io/uniffi-rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-10T07:36:02.000Z","updated_at":"2025-05-06T16:12:04.000Z","dependencies_parsed_at":"2023-09-27T19:10:07.930Z","dependency_job_id":"efd9308c-af04-48e7-ab4a-f8fd41c46d8a","html_url":"https://github.com/mozilla/uniffi-rs","commit_stats":{"total_commits":1409,"total_committers":126,"mean_commits":"11.182539682539682","dds":0.8048261178140526,"last_synced_commit":"1c8dd50de3413c03b7526aa9cab739049b64d331"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funiffi-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funiffi-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funiffi-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Funiffi-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/uniffi-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253790247,"owners_count":21964783,"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":["ffi-layer","rust-crate"],"created_at":"2024-08-01T13:02:06.817Z","updated_at":"2025-05-13T18:04:56.625Z","avatar_url":"https://github.com/mozilla.png","language":"Rust","readme":"# UniFFI - a multi-language bindings generator for Rust\n\nUniFFI is a toolkit for building cross-platform software components in Rust.\n\nFor the impatient, see [**the UniFFI user guide**](https://mozilla.github.io/uniffi-rs/)\nor [**the UniFFI examples**](https://github.com/mozilla/uniffi-rs/tree/main/examples#example-uniffi-components).\n\nBy writing your core business logic in Rust and describing its interface in an \"object model\",\nyou can use UniFFI to help you:\n\n* Compile your Rust code into a shared library for use on different target platforms.\n* Generate bindings to load and use the library from different target languages.\n\nYou can describe your object model in an [interface definition file](https://mozilla.github.io/uniffi-rs/udl_file_spec.html)\nor [by using proc-macros](https://mozilla.github.io/uniffi-rs/proc_macro/index.html).\n\nUniFFI is currently used extensively by Mozilla in Firefox mobile and desktop browsers;\nwritten once in Rust, auto-generated bindings allow that functionality to be called\nfrom both Kotlin (for Android apps) and Swift (for iOS apps).\nIt also has a growing community of users shipping various cool things to many users.\n\nUniFFI comes with support for **Kotlin**, **Swift**, **Python** and **Ruby** with 3rd party bindings available for **C#** and **Golang**.\nAdditional foreign language bindings can be developed externally and we welcome contributions to list them here.\nSee [Third-party foreign language bindings](#third-party-foreign-language-bindings).\n\n## User Guide\n\nYou can read more about using the tool in [**the UniFFI user guide**](https://mozilla.github.io/uniffi-rs/).\n\nWe consider it ready for production use, but UniFFI is a long way from a 1.0 release with lots of internal work still going on.\nWe try hard to avoid breaking simple consumers, but more advanced things might break as you upgrade over time.\n\n### Etymology and Pronunciation\n\nˈjuːnɪfaɪ. Pronounced to rhyme with \"unify\".\n\nA portmanteau word that also puns with \"unify\", to signify the joining of one codebase accessed from many languages.\n\nuni - [Latin ūni-, from ūnus, one]\nFFI - [Abbreviation, Foreign Function Interface]\n\n## Alternative tools\n\nOther tools we know of which try and solve a similarly shaped problem are:\n\n* [Diplomat](https://github.com/rust-diplomat/diplomat/), which is focused more on C/C++ interop.\n* [Interoptopus](https://github.com/ralfbiedert/interoptopus/)\n\n(Please open a PR if you think other tools should be listed!)\n\n## Third-party foreign language bindings\n\n* [React Native bindings](https://github.com/jhugman/uniffi-bindgen-react-native). The repository contains tooling to generate bindings for [Hermes](https://github.com/facebook/hermes) and for [creating Turbo Modules](https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here#new-native-modules).\n* [Kotlin Multiplatform support (Gobley)](https://github.com/gobley/gobley). The repository contains Kotlin Multiplatform bindings generation for UniFFI, letting you target both JVM and Native.\n* [Go bindings](https://github.com/NordSecurity/uniffi-bindgen-go)\n* [C# bindings](https://github.com/NordSecurity/uniffi-bindgen-cs)\n* [Dart bindings](https://github.com/NiallBunting/uniffi-rs-dart)\n* [Java bindings](https://github.com/IronCoreLabs/uniffi-bindgen-java)\n\n### External resources\n\nThere are a few third-party resources that make it easier to work with UniFFI:\n\n* [Plugin support for `.udl` files](https://github.com/Lonami/uniffi-dl) for the IDEA platform ([*uniffi-dl* in the JetBrains marketplace](https://plugins.jetbrains.com/plugin/20527-uniffi-dl)). It provides syntax highlighting, code folding, code completion, reference resolution and navigation (among others features) for the [UniFFI Definition Language (UDL)](https://mozilla.github.io/uniffi-rs/).\n* [cargo swift](https://github.com/antoniusnaumann/cargo-swift), a cargo plugin to build a Swift Package from Rust code. It provides an init command for setting up a UniFFI crate and a package command for building a Swift package from Rust code - without the need for additional configuration or build scripts.\n* [Cargo NDK Gradle Plugin](https://github.com/willir/cargo-ndk-android-gradle) allows you to build Rust code using [`cargo-ndk`](https://github.com/bbqsrc/cargo-ndk), which generally makes Android library builds less painful.\n* [`uniffi-starter`](https://github.com/ianthetechie/uniffi-starter) is a minimal project demonstrates a wide range of UniFFI in a complete project in a compact manner. It includes a full Android library build process, an XCFramework generation script, and example Swift package structure. \n\n(Please open a PR if you think other resources should be listed!)\n\n## Contributing\n\nIf this tool sounds interesting to you, please help us develop it! You can:\n\n* View the [contributor guidelines](./docs/contributing.md).\n* File or work on [issues](https://github.com/mozilla/uniffi-rs/issues) here in GitHub.\n* Join discussions in the [#uniffi:mozilla.org](https://matrix.to/#/#uniffi:mozilla.org)\n  room on Matrix.\n\n## Code of Conduct\n\nThis project is governed by Mozilla's [Community Participation Guidelines](./CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":["Rust","FFI Bindings"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Funiffi-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Funiffi-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Funiffi-rs/lists"}