Firefox Application Services
Перейти к файлу
Ben Dean-Kawamura 6c6951cdfe Updating the fxa-client example
Added flags to:
  - Request the session scope.
  - Control how log messages get printed to the console.

Updated the code to re-authenticated using the existing data rather than
throwing it away and starting from scratch.

These changes make it possible to repro
https://bugzilla.mozilla.org/show_bug.cgi?id=1887071

- run `cargo run -- --log -d devices` with fresh credentials.
  - Any command should do, but I used `devices`
  - The client should ask you to login and paste your credentials
  - You should see the device list printed out
- In a browser session, change your FxA password
- run `cargo run -- --log -d devices` again
  - The client should tell you there was an auth-problem and ask you to
    reauthenticate.
  - After you paste the reauthentication URL you should see an error
    printed out
2024-04-04 15:32:33 +00:00
.cargo Adding command to print out ingestion sizes 2024-03-22 23:09:35 +00:00
.circleci Update Rust version to 1.75, MSR to 1.70 2024-01-12 16:17:00 +00:00
.github Update some crates to avoid cargo audit errors 2024-03-06 16:02:17 +00:00
.vscode Update VSCode extensions list 2023-12-20 17:18:46 +00:00
automation Support swiftformat on non-Darwin hosts 2024-01-18 03:20:47 +00:00
build-scripts Use a Gradle version catalog for managing dependencies 2024-02-21 19:07:00 +00:00
components Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
docs Update NDK to r26c 2024-02-21 21:07:10 +00:00
examples Updating the fxa-client example 2024-04-04 15:32:33 +00:00
gradle Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
libs Update NSS to version 3.99 2024-03-16 21:13:59 +00:00
megazords Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
taskcluster ci: index release-publish task by revision 2024-04-02 16:09:39 +00:00
testing Updating the fxa-client example 2024-04-04 15:32:33 +00:00
tools Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
xcconfig Remove all Carthage and switch to xcframeworks (#4619) 2022-02-03 15:05:05 -10:00
.buildconfig-android.yml Remove the rc_log crate. 2024-03-07 16:51:12 +00:00
.cron.yml Updating our cron file 2022-04-27 10:37:33 -04:00
.detekt.yml Allow nimbus-fml WildcardImports 2023-06-16 15:40:08 +00:00
.gitignore Add .vscode to .gitignore 2023-12-13 17:06:55 +00:00
.gitmodules Remove submodule from .gitmodules 2021-03-22 18:14:41 -07:00
.mergify.yml Minor mergify modifications (#5527) 2023-05-01 15:31:13 -04:00
.swiftlint.yml Merge ios and ios-rust directories and clean up Xcode project (#4830) 2022-03-03 10:03:32 -10:00
.taskcluster.yml Upgrade CI to Taskgraph 7.0.0 2023-12-18 18:31:09 +00:00
CHANGELOG.md Start release v126.0 2024-03-18 14:11:40 +00:00
CODE_OF_CONDUCT.md Bring CPG in line with CPGBot's demands, fixes #887 2019-03-31 15:38:31 -07:00
COPYRIGHT Remove the `ffi-support` crate sources from this repo. 2021-06-01 15:56:49 +10:00
Cargo.lock Updating the fxa-client example 2024-04-04 15:32:33 +00:00
Cargo.toml Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
DEPENDENCIES.md Bumping UniFFI to 0.27.1 2024-04-04 14:34:31 +00:00
LICENSE rc_crypto initial commit (#1349) 2019-07-09 14:00:48 -04:00
README.md Remove the rc_log crate. 2024-03-07 16:51:12 +00:00
build.gradle Update NDK to r26c 2024-02-21 21:07:10 +00:00
clippy.toml Document our use of clippy and add a (empty) clippy.toml 2019-03-20 09:02:54 -07:00
codecov.yml Tell codecov our default branch is `main` 2020-07-24 09:39:45 -07:00
gradle.properties Update Gradle to version 8.5 and AGP to version 8.0.2 2024-01-22 19:57:26 +00:00
gradlew Update Gradle to version 8.5 and AGP to version 8.0.2 2024-01-22 19:57:26 +00:00
gradlew.bat Update Gradle to version 8.6 2024-02-05 15:24:36 +00:00
install-nimbus-cli.sh Build linux nimbus binaries with Ubuntu 20.04 2023-09-21 16:01:57 +00:00
proguard-rules-consumer-jna.pro Set consumer Proguard rules. 2018-11-27 20:29:10 -08:00
publish.gradle Use a Gradle version catalog for managing dependencies 2024-02-21 19:07:00 +00:00
rust-toolchain.toml Upgrade Rust to 1.75 2024-01-30 19:18:54 +00:00
settings.gradle Update SnakeYAML to version 2.2 2024-02-20 14:25:08 +00:00
version.txt Start release v126.0 2024-03-18 14:11:40 +00:00

README.md

Firefox Application Services

Application Services (a-s) is a collection of Rust Components that are used to enable Firefox applications to integrate with Firefox accounts, sync, experimentation, etc. Each component is built using a core of shared code written in Rust, wrapped with native language bindings for different platforms.

Contributing

To contribute, please review the Mozilla Community Participation Guidelines and then visit our how to contribute guide.

Contact

Get in touch with other community members on Matrix, or through issues here on GitHub.

Documentation

High-level docs

The Application Services Book contains high-level documentation about the code in this repository. It's built from the ./docs/ directory.

Package docs

We use rustdoc to document both the public API of the components and the various internal implementation details. View them on https://mozilla.github.io/application-services/book/rust-docs/fxa_client/index.html. Once you have completed the build steps, you can view the docs by running:

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

Building

Building the Rust Components

  1. Clone or Download the repository:
  $ git clone https://github.com/mozilla/application-services # (or use the ssh link)
  $ cd application-services
  $ git submodule init
  $ git submodule update --recursive
  1. Follow these instructions to install your system-level dependencies
  2. Run the a-s Rust unit tests
cargo test

Consumer build, integration and testing

The application-services library primary consumers are Fenix (Firefox on Android) and Firefox iOS. Assure you are able to run integration tests (for Android and iOS if using MacOS) by following the instructions to build for Android and iOS integrations.

Android integration builds and helpful tools

Firefox for iOS integration

Firefox Desktop

Rust Components

./components/ contains the source for each component. Note that most components have their FFI generated by the uniffi library.

List of components

  • autofill - for storage and syncing of credit card and address information
  • crashtest - testing-purposes (crashing the Rust code)
  • fxa-client - for applications that need to sign in with FxA, access encryption keys for sync, and more.
  • logins - for storage and syncing of a user's saved login credentials
  • nimbus - for integrating with Mozilla's experimentation platform for Firefox
  • places - for storage and syncing of a user's saved browsing history
  • push - for applications to receive real-time updates via WebPush
  • support - low-level utility libraries
  • sync15 - shared library for accessing data in Firefox Sync
  • sync_manager - integrates multiple sync engines/ stores into a single framework
  • tabs - an in-memory syncing engine for remote browser tabs
  • viaduct - an HTTP request library
  • webext-storage - powers an implementation of the chrome.storage.sync WebExtension API

Note the above list is partial; see the actual list under the components directory.