{"id":18041664,"url":"https://github.com/katyo/kquery","last_synced_at":"2025-04-05T02:25:37.171Z","repository":{"id":37393839,"uuid":"505688734","full_name":"katyo/kquery","owner":"katyo","description":"Deep diving tool for Linux kernel sources.","archived":false,"fork":false,"pushed_at":"2023-03-16T06:11:37.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T10:45:38.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-21T04:26:38.000Z","updated_at":"2022-06-21T06:00:57.000Z","dependencies_parsed_at":"2024-10-30T16:21:36.504Z","dependency_job_id":null,"html_url":"https://github.com/katyo/kquery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Fkquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Fkquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Fkquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katyo%2Fkquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katyo","download_url":"https://codeload.github.com/katyo/kquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247277967,"owners_count":20912638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T16:11:19.450Z","updated_at":"2025-04-05T02:25:36.946Z","avatar_url":"https://github.com/katyo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux source querying tool\n\n[![github](https://img.shields.io/badge/github-katyo/kquery-8da0cb.svg?style=for-the-badge\u0026logo=github)](https://github.com/katyo/kquery)\n[![crates](https://img.shields.io/crates/v/kquery.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust)](https://crates.io/crates/kquery)\n[![docs](https://img.shields.io/badge/docs.rs-kquery-66c2a5?style=for-the-badge\u0026logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K)](https://docs.rs/kquery)\n[![status](https://img.shields.io/github/workflow/status/katyo/kquery/Rust?style=for-the-badge\u0026logo=github-actions\u0026logoColor=white)](https://github.com/katyo/kquery/actions?query=workflow%3ARust)\n\nThis is blazing fast querying tool for deep dive into Linux source code.\nDevelopment in early stage so things may work wrong or does not work at all.\n\nCurrently it consists of querying library and simple command-line tool.\n\n## Command-line usage\n\nCreate or update index first:\n\n```sh\n$ cd path/to/linux/sources\n$ kquery index\nFound 21964 sources, 10521 compatible strings, 12519 configuration options\n```\n\nList all found sources:\n\n```sh\n$ kquery sources\n```\n\nList sources which match some pattern:\n\n```sh\n$ kquery sources drivers/**/arm/**\n```\n\nList all found compatible strings:\n\n```sh\n$ kquery compats\n```\n\nList compatible strings which match some pattern:\n\n```sh\n$ kquery compats arm,*\n```\n\nList all found configuration options:\n\n```sh\n$ kquery configs\n```\n\nList configuration options which match some pattern:\n\n```sh\n$ kquery compats ARM_*\n```\n\nQuery source info which has compatible string:\n\n```sh\n$ kquery compat arm,smmu-v2\n```\n\nQuery sources info related to configuration option:\n\n```sh\n$ kquery config ARM_SMMU\n```\n\nQuery source info by path:\n\n```sh\n$ kquery source drivers/iommu/arm/arm-smmu/arm-smmu.c\n```\n\n## Library usage\n\n```no_run\nuse kquery::{FileMgr, MetaData, Result};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n  // Create file manager instance using path to sources\n  let filemgr = FileMgr::new(\"path/to/sources\").await?;\n\n  // Create index from Linux source tree\n  let metadata = MetaData::from_kbuild(\u0026filemgr).await?;\n\n  // Store metadata into file in source tree\n  metadata.to_file(\"path/to/metadata.json\", None).await?;\n\n  // Load metadata from cache file in source tree\n  let metadata = MetaData::from_file(\"path/to/metadata.json\", None).await?;\n\n  Ok(())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatyo%2Fkquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatyo%2Fkquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatyo%2Fkquery/lists"}