Граф коммитов

108 Коммитов

Автор SHA1 Сообщение Дата
Sammy Khamis 6c839a3ade
Update uniffi 0.14.0 (#4389)
* Update UniFFI dependency to v0.14.0

Co-authored-by: Ryan Kelly <ryan@rfk.id.au>
2021-08-19 16:31:02 -10:00
Sammy Khamis d0b7b74cea
Uniffi-ing the Tabs component (#4192)
* uniffi-ed the tabs component

Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
2021-07-13 09:40:33 -10:00
Sammy Khamis b43d90441d
Uniffi-ing the Logins component (#4068)
* converting logins to using uniffi

* nits and review changes

* update changelog to put breaking changes on top
2021-06-08 15:29:01 -10:00
Mark Hammond 1248a352cb
Update rust to comply with our new rust version policy (#4165)
* Replace use of the unmaintained ctest package with ctest2.
* Use rust 1.52.1 and CI tweaks
2021-06-04 13:39:14 +10:00
Ryan Kelly 5fc2d7841c
Remove the `ffi-support` crate sources from this repo.
As of https://github.com/mozilla/application-services/issues/3463
the `ffi-support` crate lives in its own repo, and it's confusing
having an old copy of it still hanging around in this one.
2021-06-01 15:56:49 +10:00
Dan Mosedale d11cca9ea4 Disable intermittently failing tests; fixes SDK-233 and #3934 2021-03-25 09:26:57 -07:00
Dan Mosedale 1ed863e2d0 Get the Rust builds working 2021-03-22 14:23:57 -07:00
Ryan Kelly 525ca57543
Add a "crashtest" component for helping test crash-related behaviours. (#3923)
This is a definitely-for-development-purposes-only component that exposes
some functions to let you deliberately crash your application in interesting
Rust-code-related ways.

The idea is that application developers could add some developer-only UI that
deliberately  triggers one of these functions, and then try out the crash or
error-handling behaviour of their app in a live setting. We hope to be able
to use this to debug symbolication issues on Firefox for iOS, ref #3907.

As a side benefit, the very process of adding this component has let me write
a couple of nice tests that our generated bindings are working as intend around
the edges of error and panic handling.
2021-03-12 12:20:46 +11:00
Ryan Kelly d77600e32c
Restructure, UniFFI, and document the fxa-client crate. (#3876)
This is a substantial refactor of the fxa-client crate, intended to bring it
up to speed with our latest best-practices around developing cross-platform
Rust components, in order to ease ongoing maintenance.

THe core change here is that I've deleted the hand-written Kotlin and Swift
bindings, replacing them with autogenerated bindings thanks to UniFFI.

There is still a little bit of hand-written Kotlin, since we have a layer that
automatically manages persistence via a callback. There is still a nontrivial
amount of hand-written Swift, since we have a higher-level state machine built
atop the lower-level fxa-client functionality (such state-machine also exists
for Kotlin, but lives in the android-components repo). If UniFFI works out then
we should look into moving more of that logic into shared Rust code over time.

To support the introduction of UniFFI, I have restructured to Rust crate so
that its public interface deliberately parallels the interface offered to
Kotlin and Swift, and have moved the implementation details into a submodule
named `internal`. It's my opinionated belief that structuring the crate this
way will help us focus on producing a nice consumer API, which is not always
the same thing as producing a nice Rust crate.

On top of that, I've also revamped the documentation in the crate, leaning
in to the use of `cargo doc` as the source of truth for both developer-
and consumer-facing documentation. Let's consider that an experiment and
see how we like it in practice.

Unfortunately, this is a big PR, but I don't think I could have made it
too much smaller. Hopefully it will be easier to review than its size
suggests since it's mostly additions and deletions rather than complex
changes.
2021-03-09 22:34:58 +11:00
Ryan Kelly 056f4e7ef8 Add `cargo uniffi-bindgen` alias for running uniffi-bindgen.
This is an attempt to simplify how we use `uniffi-bindgen`, by making
it easy to run the version used by the workspace rather than assuming
that the user has a correctly-matching version of it installed in their
system cargo.
2021-02-25 16:13:05 +11:00
Ryan Kelly 006c1d659d
Remove the "lockbox" custom megazord.
The lockwise apps are on a very old version of appservices and I don't believe
we have a plan for updating them anytime soon. Continuing to build the lockbox
megazord does not seem like a good use of CI or local dev resources.

We understand how to bring this back if we need it, but also, if we do need
it again in future it's probably a good opportunity to revisit how we build
custom megazords in the first place.
2020-11-10 09:55:40 +11:00
Edouard Oger aa5dcccb2c
Move rate-limiter to its own support crate 2020-11-09 16:50:28 -05:00
Ryan Kelly 260d10e19c
Import nimbus-sdk as submodule, republish as part of the megazord.
This commit pulls in https://github.com/mozilla/nimbus-sdk as a
git submodule, and adds some build integration to publish it as
part of the application-services megazord. Instead of an all-in-one
nimbus package, we produce two separate packages:

* `org.mozilla.appservices:nimbus` with the Nimbus Kotlin code
* `org.mozilla.appservices:full-megazord` updated to include the
  Nimbus Rust code.
2020-11-09 16:40:21 +11:00
Ryan Kelly 24d8ceeb21
Revert "Import nimbus-sdk as submodule, republish as part of the megazord."
Nimbus SDK and its dependencies are not currently compatible with
Rust v1.43.0, but application-services is pinned to that version
of rust for compatibility with mozilla-central.

This reverts commit 8388372259.
2020-11-09 14:16:50 +11:00
Ryan Kelly 8388372259
Import nimbus-sdk as submodule, republish as part of the megazord.
This commit pulls in https://github.com/mozilla/nimbus-sdk as a
git submodule, and adds some build integration to publish it as
part of the application-services megazord. Instead of an all-in-one
nimbus package, we produce two separate packages:

* `org.mozilla.appservices:nimbus` with the Nimbus Kotlin code
* `org.mozilla.appservices:full-megazord` updated to include the
  Nimbus Rust code.
2020-11-09 13:10:35 +11:00
lougeniac64 c369ecd819 Added autofill component 2020-09-19 10:50:44 -04:00
Edouard Oger 8137485a42
Factor-out jwcrypto bits 2020-07-22 10:43:24 -04:00
Thom Chiovoloni 6212c5bc18 Review feedback 2020-07-20 10:02:11 -07:00
Thom Chiovoloni 821c163ba3 Optimize project layout to avoid bad build performance 2020-07-20 09:56:36 -07:00
Thom Chiovoloni ed757c70c2 Review feedback 2020-07-20 09:29:46 -07:00
Thom Chiovoloni 7ac4486fb5 Speed up build by specifying default members [ci full] [ci smoketest firefox-ios] 2020-07-20 09:28:23 -07:00
Edouard Oger c36062e2f8
Implement rc_crypto backed Rng for rand 2020-07-20 10:05:51 -04:00
Lina Cambridge 2ba25c4eed
Add an FFI for `storage.sync`. 2020-07-13 09:04:51 -07:00
Edouard Oger 231abf8c32
Factor out restmail client code 2020-07-02 16:32:22 -04:00
Edouard Oger 7a44610972
Merge branch 'master' into rip 2020-04-21 12:48:44 -04:00
Edouard Oger 779b94e71b
Check-in NSS bindings 2020-04-20 14:52:53 -04:00
Mark Hammond ac2950f2c3
A working (but not syncing), core chrome.storage implementation. (#2810) 2020-04-16 10:18:02 +10:00
Thom Chiovoloni 145a74ba59
Remove remerge 2020-04-10 10:17:19 -07:00
Edouard Oger 50e7244232
Add protobuf generation crate 2020-04-08 16:19:30 -04:00
Edouard Oger b3dc635930
Extract viaduct reqwest backend into its own crate 2020-03-27 16:30:30 -04:00
Thom Chiovoloni 0a6ad67098
Move fenix to the full megazord. Fixes #1466 2020-02-26 10:49:32 -08:00
Thom Chiovoloni 235560dcd1
Set LTO to thin. Fixes #2531. [ci full] 2020-02-21 13:32:49 -05:00
Thom Chiovoloni 16d447247c
Pull various types out of `sync15` into a new crate 2020-02-05 09:24:30 -08:00
Thom Chiovoloni 6678c62db3
Update libsqlite3-sys to new version, removing the patch.crates-io line 2020-01-09 11:55:00 -08:00
Thom Chiovoloni 50c73ad6d7
Hack around cargo limitations with a build.rs
See comments in the code or
https://github.com/jgallagher/rusqlite/pull/608 for more griping.
2020-01-09 11:55:00 -08:00
Thom Chiovoloni 545a0e8489
Move initial remerge code over from thomcc/remerge 2019-12-03 13:00:38 -08:00
Thom Chiovoloni 278df0b0a6
Sort workspace.members list in Cargo.toml. 2019-11-04 10:16:48 -08:00
Edouard Oger 19e4cef424
Synced Tabs crate initial commit 2019-11-01 14:06:32 -04:00
Thom Chiovoloni 9f6fcedc85
Initial implementation of the Kotlin Sync Manager API 2019-09-16 15:06:33 -07:00
Thom Chiovoloni 4eb950f21b
Merge branch 'master' into omegazord 2019-07-15 10:54:28 -07:00
YLyu 72b2722b38
Replace types::SyncGuid with the optimized sync_guid::Guid
1. Pull sync_guid implementation from guid-support branch.
2. Replace types::SyncGuid with sync_guid::Guid.
2019-07-09 22:41:06 -04:00
Thom Chiovoloni cb975b17e2
Merge branch 'master' into omegazord 2019-07-09 17:10:18 -07:00
Edouard Oger 270b0ea2a0
rc_crypto initial commit (#1349) 2019-07-09 14:00:48 -04:00
Thom Chiovoloni 463c46d4db
Remove the (now redundant) reference-browser-megazord 2019-06-12 14:29:33 -07:00
Thom Chiovoloni e9f02001eb
Add empty full-megazord 2019-06-12 12:19:40 -07:00
Lina Cambridge 0ae23eb2ab
Use JSON, not protobufs for pings.
This commit reverts the protobuf schema, in favor of passing the
serialized ping directly. On iOS, we can pass this ping directly
through to the existing ping sender. On Android, we'll need to
unpack the ping into a Kotlin structure, and pass that to Fenix
via Android Components. Fenix can then assemble a Glean ping from
the Kotlin `SyncTelemetryPing`.
2019-05-30 20:49:31 -07:00
Lina Cambridge 7eddefe95c
Add a protobuf representation for telemetry pings. 2019-05-30 20:49:31 -07:00
Edouard Oger 08d1f8c3c9
Remove rc_crypto 2019-05-03 10:46:30 -04:00
Thom Chiovoloni ed6c563c27
Move error boilerplate to a common place (#1091) 2019-04-29 12:32:37 -07:00
Thom Chiovoloni 5946e9e9dc
Update rusqlite to 0.18.0, getting us off of my branch (#1076) 2019-04-24 13:01:12 -07:00