IndexStoreDB

与 sourcekit-lsp 一起使用的索引数据库库。『Index database library for use with sourcekit-lsp』

  • Owner: swiftlang/indexstore-db
  • Platform: Linux,Mac,Windows Subsystem for Linux (WSL)
  • License:: Apache License 2.0
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

IndexStoreDB

IndexStoreDB is a source code indexing library. It provides a composable and efficient query API for looking up source code symbols, symbol occurrences, and relations. IndexStoreDB uses the libIndexStore library, which lives in swiftlang/llvm-project, for reading raw index data. Raw index data can be produced by compilers such as Apple Clang and Swift using the -index-store-path option. IndexStoreDB enables efficiently querying this data by maintaining acceleration tables in a key-value database built with LMDB.

IndexStoreDB's data model is derived from libIndexStore. For more information about libIndexStore, and producing raw indexing data, see the Indexing While Building whitepaper.

Building IndexStoreDB

IndexStoreDB is built using the Swift Package Manager.

For a standard debug build and test:

$ swift build
$ swift test

Building on Linux

The C++ code in the index requires libdispatch, but unlike Swift code, it cannot find it automatically on Linux. You can work around this by adding a search path manually.

$ swift build -Xcxx -I<path_to_swift_toolchain>/usr/lib/swift -Xcxx -I<path_to_swift_toolchain>/usr/lib/swift/Block

Some Example Users

Pecker: a tool to detect unused code based on SwiftSyntax and IndexStoreDB.

Contributing to Swift

Contributions to indexstore-db are welcomed and encouraged! Please see the
Contributing to Swift guide.

Before submitting the pull request, please make sure you have tested your
changes

and that they follow the Swift project guidelines for contributing
code
.

To be a truly great community, Swift.org needs to welcome
developers from all walks of life, with different backgrounds, and with a wide
range of experience. A diverse and friendly community will have more great
ideas, more unique perspectives, and produce more great code. We will work
diligently to make the Swift community welcoming to everyone.

To give clarity of what is expected of our members, Swift has adopted the
code of conduct defined by the Contributor Covenant. This document is used
across many open source communities, and we think it articulates our values
well. For more, see the Code of Conduct.

Development

For more information about developing IndexStoreDB, see Development.

Main metrics

Overview
Name With Ownerswiftlang/indexstore-db
Primary LanguageC++
Program languageSwift (Language Count: 7)
Platform
License:Apache License 2.0
所有者活动
Created At2018-10-26 03:42:22
Pushed At2025-06-13 12:29:42
Last Commit At
Release Count1683
Last Release Nameswift-DEVELOPMENT-SNAPSHOT-2025-06-12-a (Posted on 2025-06-13 04:03:29)
First Release Nameswift-DEVELOPMENT-SNAPSHOT-2019-02-14-a (Posted on 2019-02-15 13:04:09)
用户参与
Stargazers Count351
Watchers Count120
Fork Count79
Commits Count440
Has Issues Enabled
Issues Count8
Issue Open Count6
Pull Requests Count224
Pull Requests Open Count3
Pull Requests Close Count14
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private