a multi-language bindings generator for rust
Перейти к файлу
Mark Hammond ad7a01f803 chore: Release 2023-11-20 10:40:29 -05:00
.cargo Include uniffi_udl in the release process 2023-09-07 10:45:48 +02:00
.circleci Update rust to 1.72 (#1754) 2023-10-04 10:22:46 -04:00
.github Add full team as CODEOWNERS 2022-06-09 19:06:26 +02:00
docker Update Rust to 1.69, MSRV to 1.66.0 2023-06-06 10:54:27 +02:00
docs Make From<UnexpectedUniFFICallbackError> optional 2023-10-16 15:23:21 -04:00
examples chore: Release 2023-10-18 13:39:05 -04:00
fixtures Backport: Implement `Lift` for flat errors 2023-11-17 15:38:16 -05:00
uniffi chore: Release 2023-11-20 10:40:29 -05:00
uniffi_bindgen chore: Release 2023-11-20 10:40:29 -05:00
uniffi_build chore: Release 2023-11-20 10:40:29 -05:00
uniffi_checksum_derive chore: Release 2023-11-20 10:40:29 -05:00
uniffi_core chore: Release 2023-11-20 10:40:29 -05:00
uniffi_macros chore: Release 2023-11-20 10:40:29 -05:00
uniffi_meta chore: Release 2023-11-20 10:40:29 -05:00
uniffi_testing chore: Release 2023-11-20 10:40:29 -05:00
uniffi_udl chore: Release 2023-11-20 10:40:29 -05:00
weedle2 Remove `./` from paths, make `CODE_OF_CONDUCT.md` non-executable (#1545) 2023-05-17 08:54:56 -04:00
.dockerignore Update our rust policy to match mozilla-central's 'uses' version (#470) 2021-06-02 14:51:55 +10:00
.gitignore Commit the Cargo.lock file to build with known working versions of dependencies 2023-08-25 13:37:01 -04:00
CHANGELOG.md chore: Release 2023-11-20 10:40:29 -05:00
CODE_OF_CONDUCT.md Remove `./` from paths, make `CODE_OF_CONDUCT.md` non-executable (#1545) 2023-05-17 08:54:56 -04:00
Cargo.lock chore: Release 2023-11-20 10:40:29 -05:00
Cargo.toml Make the `UniffiCustomTypeConverter` type public (#1739) 2023-09-14 15:06:54 -04:00
LICENSE Add more README, and a walkthrough of the (barely) working example. 2020-06-10 21:27:43 +10:00
README.md Add cargo swift to "External resources" section 2023-08-14 10:24:01 +02:00
release.toml Correct the process description: releasing backend crates will not automatically create a tag 2023-06-21 15:28:37 +02:00
rust-toolchain.toml Update rust to 1.72 (#1754) 2023-10-04 10:22:46 -04:00

README.md

UniFFI - a multi-language bindings generator for Rust

UniFFI is a toolkit for building cross-platform software components in Rust.

By writing your core business logic in Rust and describing its interface in a special interface definition file, you can use UniFFI to help you:

  • Compile your Rust code into a shared library for use on different target platforms.
  • Generate bindings to load and use the library from different target languages.

For example, UniFFI is currently used in the mozilla/application-services project to build browser storage and syncing functionality for Firefox mobile browsers. Core functionality is written once in Rust, and auto-generated bindings allow that functionality to be called from both Kotlin (for Android apps) and Swift (for iOS apps).

Currently first-party supported foreign languages include Kotlin, Swift, Python and Ruby. Additional foreign language bindings can be developed externally and we welcome contributions to list them here. See Third-party foreign language bindings.

User Guide

You can read more about using the tool in the UniFFI user guide.

Please be aware that UniFFI is being developed concurrently with its initial consumers, so it is changing rapidly and there are a number of sharp edges to the user experience. Still, we consider is developed enough for production use in Mozilla products and we welcome any feedback you may have about making it more broadly useful.

Etymology and Pronunciation

ˈjuːnɪfaɪ. Pronounced to rhyme with "unify".

A portmanteau word that also puns with "unify", to signify the joining of one codebase accessed from many languages.

uni - [Latin ūni-, from ūnus, one] FFI - [Abbreviation, Foreign Function Interface]

Alternative tools

Other tools we know of which try and solve a similarly shaped problem are:

(Please open a PR if you think other tools should be listed!)

Third-party foreign language bindings

External resources

There are a few third-party resources that make it easier to work with UniFFI:

(Please open a PR if you think other resources should be listed!)

Contributing

If this tool sounds interesting to you, please help us develop it! You can:

Code of Conduct

This project is governed by Mozilla's Community Participation Guidelines.