clean up and streamline the readme

This commit is contained in:
Janet Dragojevic 2021-03-15 17:06:39 -04:00
Родитель 177419260e
Коммит 9a0ec7619d
1 изменённых файлов: 70 добавлений и 44 удалений

114
README.md
Просмотреть файл

@ -1,42 +1,85 @@
## Firefox Application Services
_A platform for building cloud-powered applications that target Firefox users._
Application Services is collection of Rust Components that are built together into the application-services (a-s) library to enable Firefox applications to integrate with Firefox accounts, sync, push and experimentation. Each component is built using a core of shared code written in Rust, wrapped with native language bindings for different platforms.
### What's this all about?
### Contributing
To contribute, please review the Mozilla [Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/) and then visit our [how to contribute](docs/contributing.md) guide.
This repository hosts the code and docs needed to integrate with the products offered by the Firefox
[Application Services](https://mana.mozilla.org/wiki/display/CLOUDSERVICES/Application+Services+Home)
team.
### Contact
Get in touch with other community members on Matrix, the mailing list or through issues here on GitHub.
- Matrix: [#sync:mozilla.org](https://chat.mozilla.org/#/room/#sync:mozilla.org) ([How to connect](https://wiki.mozilla.org/Matrix#Connect_to_Matrix))
- Mailing list: application-services@mozilla.com
If you are interested in getting involved in the development of those products
then you're in the right place! Please review the more detailed guide on
[how to contribute](docs/contributing.md) to this project as well as
the [Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/).
### Building
1. Clone or Download the repository:
```shell
git clone https://github.com/mozilla/application-services
```
1. Follow these instructions to install your [system-level dependencies](https://github.com/mozilla/application-services/blob/main/docs/build.md#building-application-services) (2 hrs)
1. Fetch and install submodule dependencies
```shell
git submodule init
git submodule update --recursive
```
1. Rust the a-s Rust unit tests
```shell
cargo tests
```
If that's not why you're here, then instead you might enjoy:
The application-services library's primary consumers are both Fenix (Firefox on Android) and Firefox iOS. Assure you are able to run integration tests for both by following the instructions to build for Android and iOS integrations.
* The [Application Services Product
Portal](https://mozilla.github.io/application-services/), if you're looking to
use those products in your application.
* The [Application Services Team Home](https://mana.mozilla.org/wiki/display/CLOUDSERVICES/Application+Services+Home)
on Mana, if you're trying to find out more about how we build them.
* Build instructions to test [Fenix integration](https://github.com/mozilla/application-services/blob/main/docs/build.md#building-for-fenix) (2 hrs)
* Build instructions to test [Firefox iOS integration](https://github.com/mozilla/application-services/blob/main/docs/build.md#building-for-firefox-ios) (2 hrs)
* Build instructions to test [Firefox Desktop integration](https://github.com/mozilla/application-services/blob/main/docs/build.md#building-for-firefox-desktop) (?? hrs)
### Documentation
We use rustdoc to document both the public API of the component and the various internal implementation details. Once you have completed the build steps, you can view the docs by running:
### Overview
```shell
cargo doc --no-deps --document-private-items --open
```
This repository is used to build client-side libraries for integrating with
Firefox Application services such as Firefox Accounts, Firefox Sync and Push.
Each of these is called a "component" and is built using a core of shared code
written in Rust, wrapped with native language bindings for different platforms.
### How an application uses sync and storage components
The end result is an application that can be assembled from re-usable components
that are largely shared across platforms, like this:
Firefox applications access the user's personal browsing data by loading a high-level "syncable store" abstraction for each datatype of interest, as well as loading several supporting components. An example application wanting to use both logins and history data would look something like this:
[![component diagram](https://docs.google.com/drawings/d/e/2PACX-1vTPOIIBsqvkWfecYOziEnv-hrkB9QbpZwcHyeyUB-p3-eP1w9L87vwnJMiGt-eO5r-K-XcHPl_YwjvU/pub?w=727&h=546)](https://docs.google.com/drawings/d/1WRv2AaOsutNdL8_E5UDsYg1sC6FKRJ9P0bBSoI7E19s/)
![component diagram](docs/diagrams/sync_components.png)
### Rust Components
* [autofill](components/autofill) - for storage and syncing of credit card and
address information
* [crashtest](components/crashtest) - testing-purposes (crashing the Rust code)
* [fxa-client](components/fxa-client) - for applications that need to sign in
with FxA, access encryption keys for sync, and more.
* [logins](components/logins) - for storage and syncing of a user's saved login
credentials
* [places](components/places) - for storage and syncing of a user's saved
browsing history
* [push](components/push) - for applications to receive real-time updates via
WebPush
* [rc_log](components/rc_log) - for connecting component log output to the
application's log stream
* [support](components/support) - low-level utility libraries
* [support/ffi](components/support/ffi) - utilities for building a component's
FFI bindings
* [support/rc_crypto](components/rc_crypto) - handles cryptographic needs backed by Mozilla's
[NSS](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS) library
* [support/sql](components/support/sql) - utilities for storing data locally
with SQL
* [sync15](components/sync15) - shared library for accessing data in Firefox
Sync
* [sync_manager](components/sync_manager) - integrates multiple sync engines/
stores into a single framework
* [tabs](components/tabs) - an in-memory syncing engine for remote browser tabs
* [viaduct](components/viaduct) - an HTTP request library
* [webext-storage](components/webext-storage) - powers an implementation of the
chrome.storage.sync WebExtension API
### Repository
The code for these components is organized as follows:
* [./libs/](libs) contains infratructure for building some native dependencies,
* [./libs/](libs) contains infrastructure for building some native dependencies,
such as NSS.
* [./components/](components) contains the source for each component, and its
FFI bindings.
@ -47,6 +90,9 @@ The code for these components is organized as follows:
* The [Kotlin bindings](components/logins/android) for use by Android
applications.
* The [Swift bindings](components/logins/ios) for use by iOS applications.
* See [./components/fxa-client](components/fxa-client) for an example the uses
[uniffi](https://github.com/mozilla/uniffi-rs/) to generate API wrappers for
multiple languages, such as Kotlin and Swift.
* [./megazords/](megazords) contains infrastructure for bundling multiple rust
components into a single build artifact called a "[megazord library](docs/design/megazords.md)"
for easy consumption by applications.
@ -63,23 +109,3 @@ The [./docs/](docs) directory holds intenal documentation about working with the
code in this repository, and is most likely only of interest to contributors.
### Components
The currently-available Rust Components in this repo are:
* [fxa-client](components/fxa-client) - for applications that need to sign in
with FxA, access encryption keys for sync, and more.
* [sync15](components/sync15) - shared library for accessing data in Firefox
Sync
* [logins](components/logins) - for storage and syncing of a user's saved login
credentials
* [places](components/places) - for storage and syncing of a user's saved
browsing history
* [push](components/push) - for applications to receive real-time updates via
WebPush
* [rc_log](components/rc_log) - for connecting component log output to the
application's log stream
* [support](components/support) - low-level utility libraries
* [support/ffi](components/support/ffi) - utilities for building a component's
FFI bindings
* [support/sql](components/support/sql) - utilities for storing data locally
with SQL