Skip to content
Snippets Groups Projects
  1. Feb 11, 2025
  2. Feb 05, 2025
  3. Apr 03, 2024
  4. Mar 26, 2024
  5. Mar 25, 2024
  6. Mar 24, 2024
  7. Mar 23, 2024
    • Ben Dean-Kawamura's avatar
      Allow more default types with proc-macros (#1925) · 9309f94c
      Ben Dean-Kawamura authored
      I implemented everything, except enum variants and also jplatte's
      suggestion of a function-based default.  I think those two can be done
      later, especially since they semi-conflict.  When you're parsing it's
      hard to tell an variant ident from a function ident.  I also think
      function-based defaults might be better for enums anyways, since they
      would work with associated data.
      
      Updated the metadata to add the `SOME` code and make the optional types
      expect that, rather than reading the literal for ther inner type.  I
      think that makes the code a bit cleaner.
      
      Split up the compounds code in Kotlin.  Now each type can only parse
      their literals rather allowing any compound-like literal for any
      compound type.
      9309f94c
    • bendk's avatar
      Merge pull request #2040 from bendk/blocking-task-queue-without-specialized-code · 17482fa5
      bendk authored
      Blocking task queue without specialized code
      Unverified
      17482fa5
    • Ben Dean-Kawamura's avatar
      Updating the async API client example · 1fbfde39
      Ben Dean-Kawamura authored
      Added some code to show how you can run blocking Rust code inside a
      foreign task queue.
      1fbfde39
  8. Mar 22, 2024
    • Salvatore Testa's avatar
      Allow for arbitrary BindingGenerator (#1991) · 6b09f11a
      Salvatore Testa authored
      De-couple TargetLanguage from the `generate_external_bindings` calls.
      This will allow 3rd-party BindingGenerators to use the methods.
      
      The `try_format_code` boolean had to be punched through (for now) to
      keep the API as similar as possible. I think a follow-up action should
      be to move the boolean to the Config.
      Unverified
      6b09f11a
  9. Mar 20, 2024
  10. Mar 19, 2024
    • Ben Dean-Kawamura's avatar
      Allow defaults for proc-macro function arguments · 20ad204c
      Ben Dean-Kawamura authored
      - Renamed FieldDefault to DefaultValue and shared it between the
        field and argument code.
      - Added a defaults field to NonExportArgs and ExportFnArgs
      - Renamed NonExportArgs to ExportedImplFnArgs.  I think that's a bit
        more clear
      20ad204c
  11. Mar 18, 2024
  12. Mar 14, 2024
  13. Mar 13, 2024
  14. Mar 12, 2024
  15. Mar 11, 2024
    • Martin Geisler's avatar
      Make `uniffi_build` optional in `uniffi_macros` (#2019) · 075efd96
      Martin Geisler authored
      * Add missing derive feature to serde dependency
      
      The code built without this, but that seems to because of an accident
      since the derive feature is not a default serde feature.
      
      I noticed this when trying to make uniffi_build an optional
      dependency of uniffi_macros — for some reason I don’t understand, this
      would make `cargo build -p uniffi_macros` fail wtih:
      
          error: cannot find derive macro `Deserialize` in this scope
            --> uniffi_macros/src/util.rs:29:14
             |
          29 |     #[derive(Deserialize)]
             |              ^^^^^^^^^^^
             |
      
      The error makes sense since the derive feature wasn’t enabled. What
      does not make sense to me is that the error wasn’t triggered before.
      
      * Make `uniffi_build` optional in `uniffi_macros`
      
      As far as I can see, the dependency on uniffi_build is not needed for
      the macros used by regular clients of UniFFI — it is only used to
      create a convenience macro for the UI tests.
      
      I named the new feature “trybuild” after the description of the macro.
      Please let me know if you have preferences for a better name.
      
      The overall goal here is to minimize the number of crates I need to
      vendor to use UniFFI — I’m hoping to get away with checking in the
      generated target language sources, so I’m currently focusing on the
      dependencies in the rest of the code base.
      Unverified
      075efd96
    • Mark Hammond's avatar
      Fix Python checking for invalid enum values. · 968e6250
      Mark Hammond authored
      The generated Python code didn't raise an exception after checking all variants.
      Without the fix the new test fails with:
      
      > enum_types.InternalError: Failed to convert arg 'a': not enough bytes remaining in buffer (0 < 4)
      
      Also upgrades the test to a unittest.
      968e6250
  16. Mar 08, 2024
  17. Mar 07, 2024
Loading