Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented Nov 26, 2025

Reading an index store using the APIs provided by libIndexStore.dylib is pretty tedious and error-prone due to its manual memory management. Add a Swift wrapper around that API. With the use of non-copyable types and lifetime annotations, this nice Swift interface has no performance overhead compared to accessing the raw C APIs.

I’ve tested the library manually so far but want to add tests before merging this.

Apart from being a nice API for any tool that needs to read an index store and doesn’t want to build on top of indexstore-db, this could the the basis for rewriting indexstore-db in Swift, should we want to one day.

Reading an index store using the APIs provided by `libIndexStore.dylib` is pretty tedious and error-prone due to its manual memory management. Add a Swift wrapper around that API. With the use of non-copyable types and lifetime annotations, this nice Swift interface has no performance overhead compared to accessing the raw C APIs.
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