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.
- 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.
* [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
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.
* 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>
- 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.
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.
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.
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.
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.
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.
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.
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.