Skip to content

Use primitive arrays for better ergonomics/performance#51

Merged
skeet70 merged 2 commits into0.31.0-uniffi-updatefrom
44-primitive-arrays
Mar 23, 2026
Merged

Use primitive arrays for better ergonomics/performance#51
skeet70 merged 2 commits into0.31.0-uniffi-updatefrom
44-primitive-arrays

Conversation

@skeet70
Copy link
Copy Markdown
Member

@skeet70 skeet70 commented Mar 21, 2026

Fixes #44 and unblocks IronCoreLabs/ironcore-alloy#265

We're in a breaking change with the 0.31.0 upgrade, where we're also taking advantage and switching to primitives from boxed values as much as we can, so this fits in nicely. If we want to push it out later we could add the use_primitive_arrays config option I mentioned in the changelog and default it to false (instead of the true it would default to if this goes in first and its later requested).

where possible. Special cases for primitives in the same vein as byte arrays,
any compound types will still be List-based
@skeet70 skeet70 requested a review from a team as a code owner March 21, 2026 05:36
@skeet70 skeet70 requested review from giarc3 and removed request for a team March 21, 2026 05:36
@github-actions
Copy link
Copy Markdown

File Coverage Lines
All files 90% 90%
src/gen_java/mod.rs 92% 92%

Minimum allowed coverage is 0%

Generated by 🐒 cobertura-action against 6f20020

@skeet70 skeet70 merged commit 8cd7e78 into 0.31.0-uniffi-update Mar 23, 2026
7 checks passed
@skeet70 skeet70 deleted the 44-primitive-arrays branch March 23, 2026 22:55
skeet70 added a commit that referenced this pull request Mar 24, 2026
* Update to 0.29.3

* Uniffi 0.29.4 update

* Uniffi 0.29.5 update

- bugfix to prevent a potential Arc double free in async code if both the called function and the error handle threw.

* Uniffi 0.30.0 checkpoint

Need another thorough once over of the required changes.

* Uniffi 0.30.0 update

- added external type support
- fixed external errors, got rid of workaround
- switched to JNA direct mapping
- added config option omit_checksums
- still no defaults even though others expanded default support

* Uniffi 0.30.0 complete, added tests to cover new functionality

* First pass at 0.31.0

Needs some more work on proc macro cases and probably more test cases

* Fully qualify all `java.lang` types in templates

This prevents bugs like the few we've had so far where a type wasn't imported
because it wasn't added to the specific template where something was used. It also
eliminates the possibility of collisions with enum variant classes names.

* Add changelog so far

* Support the rename config option

* Add missing rename test, switch to primitives where possible

* Add a compatibility note

* Don't call no-op cleaner for a NoHandle test object

* Less chipper tests, use kotlin style trait object name resolution

it may be a bit more robust with edge cases like external types

* Clippy + fmt

* Missed the sort check

* Add a test to show that #37 is fixed in this branch

* Add new options to config table in readme

* Restrict the `_` only to places where non-template params might be in play

* Use primitive arrays for better ergonomics/performance (#51)

* Use primitive arrays for better ergonomics/performance

where possible. Special cases for primitives in the same vein as byte arrays,
any compound types will still be List-based

* Sort cargo

* Update readme/help text

* Bump version for release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants