Skip to main content

Crate sqry_core

Crate sqry_core 

Source
Expand description

sqry-core: Core library for semantic code search

This library provides the foundational components for sqry, a semantic code search tool that understands code structure through AST analysis.

§Architecture

The library is organized into several key modules:

  • search: Core search engine and pattern matching
  • ast: AST parsing and querying
  • indexing: Incremental hashing and index compression utilities
  • cache: Caching layer for performance
  • session: Session-level caching for warm multi-query execution
  • plugin: Plugin system for language extensibility
  • output: Output formatters (text, JSON)

§Example

use sqry_core::search::SearchEngine;

let engine = SearchEngine::new();
let results = engine.search("pattern", "path/to/code")?;

§Status

This library is under active development (Phase 0). APIs are subject to change.

Re-exports§

pub use confidence::ConfidenceLevel;
pub use confidence::ConfidenceMetadata;

Modules§

ast
AST parsing and querying AST query system for semantic code search
cache
Caching layer AST and symbol caching for performance.
common
Common types and utilities Common types used across the library
confidence
Confidence metadata for analysis results Confidence metadata for analysis results.
config
Configuration module (buffer sizes, tuning parameters) Configuration module for sqry.
errors
Error types for programmatic tool integration Structured error types for programmatic tool integration
git
Git integration for change tracking Git integration for change-aware index updates
graph
Unified graph architecture for cross-language code analysis Unified graph architecture for cross-language code analysis
hash
BLAKE3 hashing utilities for cache module BLAKE3 hashing utilities for cache module.
indexing
Indexing utilities (incremental hashing, compression) Indexing utilities shared across graph builders and caches.
io
I/O utilities for efficient file operations I/O utilities for efficient file operations
json_response
JSON response types for programmatic tool integration Structured JSON response types for programmatic tool integration
metadata
Shared metadata constants for language plugins Shared metadata key constants for language plugins
normalizer
Metadata normalization for backward compatibility Metadata normalization for symbol attributes
output
Output formatting (text, JSON, diagrams) Output formatters for sqry-core.
plugin
Plugin system for language extensibility Plugin system for language support.
progress
Progress reporting for indexing and graph builds Progress reporting for indexing operations.
project
Project root lifecycle management (per PROJECT_ROOT_SPEC.md) Project root lifecycle management
query
Query language for AST-aware code search Query language for AST-aware code search
relations
Shared relation extraction infrastructure for language plugins Shared relation extraction infrastructure for language plugins.
schema
Canonical schema types (single source of truth for semantic enums) Canonical schema types for sqry.
search
Core search functionality
session
Session management for multi-query caching
uses
Local uses and insights (privacy-respecting behavioral capture)
visualization
Visualization helpers (graph exporters for DOT, D2, Mermaid, JSON) Visualization utilities (diagram rendering, export formats).
watch
File system watcher for CLI watch mode File system watcher for real-time index updates.
workspace
Workspace registry and discovery utilities Workspace registry and discovery utilities for multi-repo indexing.

Structs§

Error
Re-exports for convenience The Error type, a wrapper around a dynamic error type.

Type Aliases§

Result
Re-exports for convenience Result<T, Error>