Open-source project
mozilla/application-services avatar
mozilla/application-services

Application Services: the Rust core behind Firefox accounts and sync

Firefox Application Services

675 stars282 forksRustNOASSERTION

At a glance

What is it?
Mozilla's application-services repository holds the Rust components that let Firefox applications talk to Firefox accounts, sync, experimentation and remote settings, with Kotlin and Swift bindings generated by uniffi. The payoff is one implementation of shared behaviour across platforms, and the price is a monorepo where the integration tests, not the code, are the hard part.
Who is it for?
Application Services suits teams building Firefox adjacent applications that need the same accounts, sync, push or remote settings behaviour as the browser, and who want to share one Rust implementation rather than two native copies. It is the wrong tool for a standalone product with no Firefox accounts requirement, since the components are shaped around FxA and its sync model, and the build is heavy for a quick integration.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

One Rust core, many native shells

Application Services, abbreviated a-s, is a collection of Rust components that enable Firefox applications to integrate with Firefox accounts, sync, experimentation and similar services. The architecture is stated in one sentence: each component is built on a core of shared code written in Rust, wrapped with native language bindings for different platforms. That arrangement exists because the same behaviour is needed on Android, on iOS and on the desktop, and because a bug fixed in the shared core is fixed everywhere at once rather than in three codebases. The consumers named in the README are Fenix, which is Firefox on Android, and Firefox iOS, with Firefox Desktop integration covered by its own build instructions. The audience for this repository is therefore not the general Rust community but the engineers working inside and around Mozilla's Firefox applications, and the code is structured to be read by them.

uniffi generates the Kotlin and Swift bindings

The binding mechanism is the part to understand before reading any component. The README notes that most components have their FFI generated by the uniffi library. The components/places directory is given as the worked example: it holds the shared Rust source under components/places/src, the Kotlin bindings under components/places/android for use by Android applications, and the Swift bindings under components/places/ios for use by iOS applications. The fxa-client component is the second example, described as one that uses uniffi to generate API wrappers for multiple languages, such as Kotlin and Swift. The difference from a hand-written FFI layer is that the wrappers are derived from the Rust definitions rather than maintained separately, so a change in the Rust API propagates to the generated bindings instead of silently drifting. The trade-off is that generated bindings constrain what the calling code can express, and that the interface is effectively defined in Rust whether or not the consumer would have written it that way.

The component list is a map of what Firefox keeps

Reading the component index is the fastest way to understand the scope. There is fxa-client, for applications that need to sign in with FxA and to access encryption keys for sync. There are the data features: places for browsing history, logins for saved credentials, autofill for credit card and address information, and tabs, an in-memory syncing engine for remote browser tabs. Sync itself is split, with sync15 as a shared library for accessing data in Firefox Sync and sync_manager integrating multiple sync engines and stores into a single framework. The service clients are push for real-time updates via WebPush, remote-settings, nimbus for Mozilla's experimentation platform, ads-client for fetching ads via UAPI, and webext-storage, which powers an implementation of the chrome.storage.sync WebExtension API. Two support libraries sit underneath: support/rc_crypto handles cryptographic needs backed by Mozilla's NSS library, and support/sql provides utilities for storing data locally with SQL. One entry exists purely for testing, crashtest, which exists to crash the Rust code. The list is explicitly partial, and the real set is the components directory.

Building the components and running the tests

The build steps are short, and the first one is the one people miss. The repository is cloned with its submodules initialised and updated recursively, because the Rust components depend on other checked-out sources:

shell
  $ git clone https://github.com/mozilla/application-services # (or use the ssh link)
  $ cd application-services
  $ git submodule init
  $ git submodule update --recursive

After that come the system level dependencies, described in docs/building.md, and then the Rust unit tests, which run with cargo test:

shell
cargo test

The documentation itself is built from the docs directory into the Application Services Book, and the API documentation is generated with rustdoc, covering both the public API of the components and the internal implementation details:

shell
cargo doc --no-deps --document-private-items --open

Running that last command after the build steps gives you a browsable version of the internal API, which is unusually generous for a repository of this size and is the fastest way to understand a component you have never touched.

The integration tests are where the work is

The README is direct about this. The primary consumers of the library are Fenix and Firefox iOS, and you are told to make sure you can run integration tests for Android and iOS, using macOS if that is your platform, by following the instructions for building those integrations. Separate build instructions exist for the Fenix and android-components integration, for Firefox iOS and for Firefox Desktop, and there is an auto-publication workflow for android-components and application-services in the Fenix repository, which is how a change here ends up inside a shipped browser. So the unit test run is the easy half. A component that passes cargo test may still fail to build for Android, fail to link, or fail its FFI expectations in the host application. The cross platform cost is structural: the Rust core has to compile for several targets, the generated bindings have to be regenerated, and the host applications have to be built against them. Anyone budgeting for a contribution should budget for that loop, not only for the code change.

A monorepo with three build systems in it

The repository layout explains the workflow better than any diagram. There is a Cargo.toml at the root declaring a workspace with a large members list, where every component and even integration-test-only crates are enumerated, and a note that additions to the members list should be repeated in the default-members list unless the crate should not be built by default. Alongside the Cargo workspace there is a Gradle build, with build.gradle, settings.gradle, gradle.properties, a gradlew wrapper and publish.gradle, and a megazords directory, which is where the combined FFI artifacts for the whole set of components are assembled. The JavaScript and Kotlin sides are checked in with a .detekt.yml and a detekt-baseline.xml for the Kotlin linter, plus a .mergify.yml for merge automation. CI configuration is not in GitHub Actions but in .taskcluster.yml and the taskcluster/ directory, with .circleci/ also present, and .cron.yml scheduling periodic work. Then there is the supporting cast: automation/, build-scripts/, testing/, tools/, libs/, examples/ with a long list of small command line programs such as the nimbus, places and suggest CLIs, and monorepo-hacks/ for repository wide chores. A rust-toolchain.toml pins the toolchain, and clippy.toml, .editorconfig and a .vscode/ directory round out the developer setup.

Licence, versioning and who to ask

The repository's licence field is a custom licence that GitHub cannot categorise, so the LICENSE file at the root is the text that governs, and the tree carries a COPYRIGHT file and a license.template for new files. That arrangement is normal inside a large corporate project and means you should read the file rather than assume a standard permissive licence. Versioning follows the browser. The recent releases are v159.0.1 from 2026-10-16, v159.0 from 2026-10-08 and v158.0 from 2026-09-24, with a version.txt file in the tree and a CHANGELOG.md alongside DEPENDENCIES.md, which tracks the third party crates the components rely on. The last push to the main branch was on 2026-10-19. Community contact is through Matrix in the rust-components room, through GitHub issues, and the contribution guide is docs/contributing.md, which sits behind the Mozilla Community Participation Guidelines. The homepage for the project documentation is mozilla.github.io/application-services, where the Application Services Book is published.

Editorial conclusion

Application Services suits teams building Firefox adjacent applications that need the same accounts, sync, push or remote settings behaviour as the browser, and who want to share one Rust implementation rather than two native copies. It is the wrong tool for a standalone product with no Firefox accounts requirement, since the components are shaped around FxA and its sync model, and the build is heavy for a quick integration. Before adopting it, clone the repository with its submodules, follow the system dependency guide, and confirm you can run the integration tests for your target platform, because the unit tests are the easy half of the story.

Frequently asked questions

What is mozilla/application-services?

It is a collection of Rust components, abbreviated a-s, that let Firefox applications integrate with Firefox accounts, sync, experimentation and related services. Each component is shared Rust code wrapped in native language bindings for different platforms.

How do you build the Rust components and run their tests?

Clone the repository, run git submodule init and git submodule update --recursive, install the system level dependencies listed in docs/building.md, then run cargo test. The API documentation is generated with cargo doc --no-deps --document-private-items --open.

Which applications consume Application Services?

The primary consumers are Fenix, Firefox on Android, and Firefox iOS, and the README also points to build instructions for Firefox Desktop integration. The repository carries a Jenkins style auto-publication workflow reference in the Fenix project for shipping changes to android-components and application-services.

How are the Kotlin and Swift bindings produced?

Most components have their FFI generated by the uniffi library. The components/places directory shows the pattern, with shared Rust code under src, Kotlin bindings under android and Swift bindings under ios, and fxa-client is the example of uniffi generating wrappers for several languages.

Official sources

  1. Issues
  2. mozilla/application-services on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/mozilla-application-services.svg)](https://hysenlabs.com/projects/mozilla-application-services)

Was this useful?