IndexStoreDB

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

  • 所有者: swiftlang/indexstore-db
  • 平台: Linux,Mac,Windows Subsystem for Linux (WSL)
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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.

主要指标

概览
名称与所有者swiftlang/indexstore-db
主编程语言C++
编程语言Swift (语言数: 7)
平台
许可证Apache License 2.0
所有者活动
创建于2018-10-26 03:42:22
推送于2025-06-13 12:29:42
最后一次提交
发布数1683
最新版本名称swift-DEVELOPMENT-SNAPSHOT-2025-06-12-a (发布于 2025-06-13 04:03:29)
第一版名称swift-DEVELOPMENT-SNAPSHOT-2019-02-14-a (发布于 2019-02-15 13:04:09)
用户参与
星数351
关注者数120
派生数79
提交数440
已启用问题?
问题数8
打开的问题数6
拉请求数224
打开的拉请求数3
关闭的拉请求数14
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?