Skip to content

Conversation

@ktoso
Copy link
Collaborator

@ktoso ktoso commented Jan 15, 2025

Early prototyping of a type that is able to operate from Java on native Swift arrays without copying them out of Swift land.

The wrapper should be able to be generic and reasonably safe, where lifetime is managed with an arena, and it is typesafe when used with jextract imported types.

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
}

let DATA = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: make it not global and deal with lifetime

p("i:\(i)")
}

// TODO: workaround until we expose properties again
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Seems we didn't yet finish moving to the "thunk way" the properties, gotta do that.

// ==== ------------------------------------------------------------------------
// swap

public Wrapped swap(int i, int j) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixme, wrong signature

@ktoso ktoso force-pushed the wip-swift-array-accessor branch 2 times, most recently from a5b2057 to 2d7fb88 Compare January 17, 2025 01:38
@ktoso ktoso force-pushed the wip-swift-array-accessor branch from 2d7fb88 to 49d8ffa Compare January 17, 2025 01:46
@ktoso
Copy link
Collaborator Author

ktoso commented Jan 30, 2025

This is fully expected to conflict a lot right now; I pulled pieces out from it and had changed around a bit to make incremental progress on value types support for now.

@ktoso ktoso marked this pull request as draft January 30, 2025 11:55
@ktoso ktoso closed this Jun 27, 2025
@ktoso ktoso deleted the wip-swift-array-accessor branch June 27, 2025 04:58
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.

1 participant