Expand description
§ryo-symbol
Symbol system for Rust codebase - unique identifiers and file path management.
§Overview
This crate provides:
- SymbolPath: Rust ecosystem-wide unique symbol identifier (
tokio::sync::Mutex::lock) - SymbolId: High-performance internal ID (SlotMap-based, O(1) operations)
- SymbolRegistry: Central registry for symbol management
- WorkspaceFilePath: Self-contained file path with workspace root
- WorkspacePathResolver: Path normalization and validation
§Design Philosophy
- Two-layer architecture:
SymbolPath(external) ↔SymbolId(internal) - Single source of truth: All symbol operations go through
SymbolRegistry - Self-contained paths:
WorkspaceFilePathcan resolve to absolute path without external context
§New in this version
- ContentCache: File freshness tracking (hash/mtime)
- SymbolPath: Added
from_workspace_file,item_in_file,nested_in_filemethods - FilePathResolver: SymbolPath → WorkspaceFilePath conversion
Re-exports§
Structs§
- Cache
Entry - Cache entry for a single file
- Cargo
Metadata Provider - Cargo metadata based workspace provider
- Content
Cache - Content cache for tracking file freshness
- Crate
Info - Information about a crate in the workspace
- Crate
Name - Crate name from Cargo.toml
- File
Path Resolver - Resolves symbol paths to file paths
- File
Span - Position information within a file
- Import
Map - Per-module import mapping
- Invalid
Symbol Id - Invalid SymbolId error
- Memory
Stats - Memory usage statistics
- ReExport
Info - Re-export information
- Segment
- Path segment
- Symbol
Id - High-performance internal symbol ID
- Symbol
Path - Rust ecosystem-wide unique symbol path
- Symbol
Path Builder - Builder for SymbolPath
- Symbol
Path Resolver - Resolves WorkspaceFilePath to SymbolPath
- Symbol
Ref - Unified symbol reference with ID and Path
- Symbol
Registry - Central registry for symbol management
- Target
Info - Information about a cargo target (lib, bin, etc.)
- UseResolver
- Workspace-wide use resolver
- Uuid
- A Universally Unique Identifier (UUID).
- Workspace
File Path - Normalized relative path from workspace root (self-contained)
- Workspace
Path Resolver - Workspace path resolver
Enums§
- Crate
Layout - Layout of a crate within a workspace
- Entry
Point - Entry point type for a crate
- Freshness
- Freshness status for a file
- Invalid
Crate Name Error - Invalid crate name error
- Metadata
Error - Error type for CargoMetadataProvider
- Parse
Error - SymbolPath parse error
- Registration
Error - Symbol registration error
- Rename
Error - Symbol rename error
- Resolution
Error - Path resolution error (for local paths like
crate::,self::,super::) - Resolve
Error - WorkspacePathResolver error
- Symbol
Kind - Symbol type classification
- Target
Kind - Kind of cargo target
- Unregister
Reexport Error - Re-export unregistration error
- VarScope
- Variable scope type for InSymbol
- Visibility
- Visibility of a symbol
- Workspace
Type - Type of workspace structure
Traits§
- Workspace
Metadata Provider - Workspace metadata provider trait
Functions§
- write_
with_ parents - Write content to a file, creating parent directories if needed