Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mozilla/uniffi-rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.0
Choose a base ref
...
head repository: mozilla/uniffi-rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.0
Choose a head ref
  • 19 commits
  • 68 files changed
  • 7 contributors

Commits on Mar 8, 2021

  1. Merge pull request #415 from jhugman/release-v0.8.0

    (cargo-release) version 0.8.0
    rfk authored Mar 8, 2021
    Configuration menu
    Copy the full SHA
    f47c3fb View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2021

  1. Use static assertions to check uniffi/uniffi-bindgen version compatib…

    …ility. (#414)
    
    Fixes #413.
    
    Prior to this commit, the `uniffi-bindgen` command would use `cargo metadata`
    to discover the version of uniffi being used by the target crate, and would
    error out if did not match the version of uniffi-bindgen itself.
    
    Unfortunately, this approach is not reliable when the target crate is being
    compiled as a dependency rather than as the primary crate. The build process
    may pick a version of uniffi based on the `Cargo.lock` of the primary crate
    or based on resolving compatible versions with other dependencies, while
    while `cargo metadata` will report the verison of uniffi that would be used
    if you built the target crate in isolation.
    
    To avoid these potential sources of error, this commit switches to an approach
    based on static assertions, in two halves:
    
    * When generating the Rust scaffolding, we emit a call to a new
      macro `uniffi::assert_compatible_version!(v)` and pass it a static
      string constant representing the version of uniffi_bindgen that
      generated the code.
    
    * When compiling the resulting code as part of a uniffied crate, the
      `assert_compatible_version!` macro will check the static string against
      the version of uniffi being used in the build, producing a compile-time
      failure if they do not match.
    
    This is a slightly worse consumer experience because the error message
    isn't as good, but it's more reliable, so I think it's a win overall.
    
    Be warned, I had to do some terrible things to perform this check in
    a compile-time const context on stable Rust :-/
    
    I've also taken the opportunity to try out the `trybuild` crate to
    write a testcase for the actual compiler error message generated
    by the macro. As we come to iterate more on the developer experience,
    I expect `trybuild` or something like it will become pretty important.
    rfk authored Mar 17, 2021
    Configuration menu
    Copy the full SHA
    67fcfaf View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. Flesh out the docs on consuming Swift bindings. (#405)

    Based on recent experience with trying to use this on an
    an existing Swift+Rust project.
    rfk authored Mar 31, 2021
    Configuration menu
    Copy the full SHA
    0706b64 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Convert the todolist example to be threadsafe. (#422)

    For demonstration purposes we mark the interface as threadsafe,
    meaning we need to drop all `&mut self` functions and wrap
    `self.items` in a suitable wrapper - `RwLock` in this case.
    
    This is done in support of [ADR-0004](
    https://github.com/mozilla/uniffi-rs/blob/main/docs/adr/0004-only-threadsafe-interfaces.md),
    which will contain a link to this PR/commit to show an example of the
    kind of modifications interfaces  need to become threadsafe.
    mhammond authored Apr 1, 2021
    Configuration menu
    Copy the full SHA
    454dfff View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. Configuration menu
    Copy the full SHA
    a689ed1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69babe9 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2021

  1. Fix swiftformat issues with Swift extension template (#428)

    Move the `fileprivate` access modifier to the extension declaration to reduce swiftformat errors in generated code. This required a separate extension declaration for the protocol conformance because `fileprivate` could not be applied to the same declaration as the one declaring the protocols.
    travis79 authored Apr 16, 2021
    Configuration menu
    Copy the full SHA
    76c4281 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Configuration menu
    Copy the full SHA
    bee9195 View commit details
    Browse the repository at this point in the history
  2. Add an ADR to remove support for non-threadsafe interfaces. (#421)

    This attempts to the document the reasons why we think removing
    support for uniffi managing thread-safety is a bad idea and
    formalizes a decision to remove that support.
    mhammond authored Apr 19, 2021
    Configuration menu
    Copy the full SHA
    a7ddeed View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2021

  1. Store the universe of known types in an ordered BTreeSet (#374) (#433)

    The set of types is used in multiple places during FFI creation. When
    the data structure does not guarantee the order of elements, such as
    HashSet, the resulting generated source code is not deterministic. Using
    a BTreeSet resolves this issue by providing a well-defined element order
    over which the the set may be iterated.
    
    Co-authored-by: Matthew Finkel <sysrqb@torproject.org>
    sysrqb and Matthew Finkel authored Apr 29, 2021
    Configuration menu
    Copy the full SHA
    621a84f View commit details
    Browse the repository at this point in the history

Commits on May 7, 2021

  1. Configuration menu
    Copy the full SHA
    d28e1f8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fb08e9e View commit details
    Browse the repository at this point in the history
  3. New 'coverall' fixture to test coverage and edge-cases. (#431)

    This is similar to our examples, but it's intended to be contrived and to
    ensure we get good test coverage of all possible options - particularly for
    future changes.
    
    It's in the "fixtures" directory so it doesn't even need to make a cursory
    effort to be a "good example"; it intentionally panics, asserts params are
    certain values, has no-op methods etc. If you're trying to get your head
    around uniffi then the "examples" directory will be a much better bet.
    mhammond authored May 7, 2021
    Configuration menu
    Copy the full SHA
    9aee208 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2021

  1. Document the builtin-bindgen feature.

    mhammond authored and rfk committed May 18, 2021
    Configuration menu
    Copy the full SHA
    b5a54b1 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2021

  1. Adjust expected trybuild error output for new rust version.

    I recently updated the docker image that we use to run CI, which
    seems to have perturbed the version of Rust being used, which has
    subtly changed the expected error output from `trybuild`. This
    should get CI passing again.
    rfk committed May 19, 2021
    Configuration menu
    Copy the full SHA
    5a12fa2 View commit details
    Browse the repository at this point in the history
  2. Issue deprecation warning for non-Threadsafe interfaces (#429)

    Now that [adr-0004](https://github.com/mozilla/uniffi-rs/blob/main/docs/adr/0004-only-threadsafe-interfaces.md)
    has been approved, we should deprecate non-threadsafe interfaces ASAP,
    to ensure that consumers have as much time as possible to migrate
    before we drop support for non-threadsafe interfaces entirely.
    mhammond authored May 19, 2021
    Configuration menu
    Copy the full SHA
    118c1cd View commit details
    Browse the repository at this point in the history
  3. Make all examples, other than Threadsafe, Threadsafe. (#447)

    We are leaving the Threadsafe example as the only one
    which supports a non-threadsafe interface until we actually
    remove support for non-theadsafe interfaces.
    mhammond authored May 19, 2021
    Configuration menu
    Copy the full SHA
    db282c0 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2021

  1. Configuration menu
    Copy the full SHA
    03f38cb View commit details
    Browse the repository at this point in the history
  2. (cargo-release) version v0.9.0

    rfk committed May 21, 2021
    Configuration menu
    Copy the full SHA
    e27bb16 View commit details
    Browse the repository at this point in the history
Loading