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

125 Коммитов

Автор SHA1 Сообщение Дата
MatthewTighe d054f01641 Add Remote Settings client component 2023-05-16 17:09:43 +00:00
Charlie f746d37f14
Set up Cirrus UDL (#5475)
* add cirrus udl and megazord
* update changelog
2023-05-02 15:28:09 -04:00
jhugman 5f780328a1
Initial commit of nimbus-cli (#5494) r=charlie, tarik
* Add nimbus-cli to workspace

* Initial commit

* Add docs and colors to output

* Add testing

* Add preserve-bucketing

* Update dependency audit to account for h2 vuln

* Address reviewer comments

* Add docs and changelog

* Override isEnrollmentPaused
2023-04-26 18:53:09 +01:00
MatthewTighe ae78506995 Create shared remote settings client and port Nimbus to it. 2023-02-15 14:03:12 -08:00
Ben Dean-Kawamura 8496e93409 Use UniFFI to export our logging API (gh-5308)
Added a new crate called `rust-log-forwarder` that forwards logs to
consumers. This does basically the same thing as `rc-log`, but it uses
UniFFI. Once our consumer apps swich over to `rust-log-forwarder`, we
can remove the `rc-log` component.
2023-02-14 13:53:09 -05:00
Ben Dean-Kawamura 6ecde0b247 Don't use workspace dependencies for UniFFI.
This was really nice, but it breaks when we get vendored in to
moz-central.  So we have to go back to the dark ages.
2023-01-30 12:26:58 -05:00
Ben Dean-Kawamura a79f23574f Updating UniFFI to version 0.23
- Switched to using workspace dependencies, this will make future
  updates much simpler
- Updated code to work with the new UniFFI crate structure
- Updated the error-support integration tests to work with the workspace
  dependencies, following this advice: https://stackoverflow.com/a/71461114.
2023-01-27 12:38:55 -05:00
Tarik Eshaq f24d345731
Make handle_error as a proc macro (#5184)
* [demo] handle_error as a proc macro

* Adds more tests

* Rework handle_error proc macro to take no arguments

* ignore rustdoc since it doesn't have expore to error_support

* Removes function signature validation
2023-01-25 16:00:36 -05:00
Mark Hammond d8503475f4
Merge sync15-traits back into sync15 via features. (#5125) 2022-09-15 11:09:04 +10:00
Mark Hammond e5d8a6d76c
Get sync-test working again. (#5107)
sync-test was removed from the workspace some time ago, which meant it
was never built or checked, so it went quite stale, particularly with
respect to logins changes.

We not keep it in the workspace but as an "excluded" item, which means
you can run it from its directory. To prevent it going stale again, CI
runs clippy on it.

Also needed a few misc tweaks to some other crates.
2022-09-08 20:02:18 +10:00
Tarik Eshaq 53d8020e1f
Ships a seperate megazord for focus-ios (#4953)
* Ship a focus specific megazord

* fix bash lint

* Fix rustfmt

* Fixes broken script

* Fixes script lint

* Adds changelog
2022-05-11 12:26:22 -07:00
Sammy Khamis 3fbe10cfbe
Merge ios and ios-rust directories and clean up Xcode project (#4830)
* remove ios and keep ios-rust directory
2022-03-03 10:03:32 -10:00
Sammy Khamis 73427f79a6
Places uniffication (#4770)
* initial conversion of errors for places uniffication

* Converted history metadata functions for places uniffication

* Converted kotlin history metadata functions

* Converted iOS history metadata functions

* [Places uniffication] Fix places error issues (#4687)

* remove uniffi-specific wrapper and updated error test

* Uniffi VisitObservation and apply_observation (#4689)

* uniffied VisitObservation, HistoryVisitInfo and methods using those structs

* Uniffi top frecent site info (#4711)

* Uniffi top frecent site info

* Uniffis FrecencyThresholdOption

* Uniffi Places Sync (#4714)

* uniffi places sync and sync15 functions

* Uniffi Search result and match url (#4720)

* Uniffi query autocomplete

* uniffi places_accept_result

* uniffi places_match_url

* cargo fmt

* cargo clippy

* remove accept_result from ffi crate

* Adds comment on the uniffi bug with varaint shadowing type

* Uniffi Places Interrupt methods (#4726)

* uniffi places interrupt functions

* Consolidate types (#4736)

* Updates the visit observation to use URL

* Uses VisitTransition for HistoryVisitInfo

* updates uniffi to 0.16

* Uniffied bookmarks

* switch to use uint in the apis for adding bookmarks (#4747)

* Remove the manual places FFI entirely.

* folders and separators now have non-nullable parents

* Always insert via Insertable items, and clarify separation between node types.

* Add json_tree module with all json-based types and implementation.

* Fix swift warnings re non-null parentGuid

* bookmarks: Remove public_node and introduce a fetch module

* Update swift code to make breaking changes fixes cleaner (#4766)

* rebased and added changelog entry

Co-authored-by: lougeniac64 <lougeniaC64@users.noreply.github.com>
Co-authored-by: Tarik Eshaq <teshaq@mozilla.com>
Co-authored-by: Mark Hammond <mhammond@skippinet.com.au>
2022-01-20 15:00:00 -05:00
Ben Dean-Kawamura c63dd82c8a UniFFI SyncManager
- Replaced hand-written FFI code with UniFFI code
- Updated error handling to just use thiserror.  There's no need for
  error-support anymore.
- Added an enum for the SyncParams.engine.  This seems cleaner than
  having None mean sync all engines.
- Replaced `SyncResult.results` with `SyncResult.successful` and
  `SyncSyncResult.failures`.  Before this was handled in the Kotlin
  wrapaper code.
- Made the megazord depend on tabs directly.  Before it pulled in tabs
  because of a transitive dependency from sync_manager_ffi.
2021-11-17 09:28:39 -05:00
Tarik Eshaq d0d45528a1
initial feature-manifest language setup (#4588) 2021-10-19 09:17:27 -07:00
Tarik Eshaq 7a1533b858
Uniffi push component (#4431)
* Adds Push UDL

* [push] Rust code compiles with scaffolding

* [push] removes FFI crate

* [push] removes protocol buffers

* [push] cleans up android api after uniffication

* Removes push from protobuf_files.toml

* Adds changelog
2021-09-13 14:47:30 -07:00
Sammy Khamis e1abe5ad61
Build iOS Rust code as an XCFramework. (#4396)
* Build iOS Rust code as an XCFramework.

Co-authored-by: Ryan Kelly <ryan@rfk.id.au>
2021-08-20 12:44:56 -10:00
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