| Crates.io | neural-shared |
| lib.rs | neural-shared |
| version | 0.1.0 |
| created_at | 2025-12-24 02:24:22.270798+00 |
| updated_at | 2025-12-24 02:24:22.270798+00 |
| description | Shared utilities for Neural Garage code analysis tools - parsers, scanners, and reporters |
| homepage | https://github.com/neural-garage/tools |
| repository | https://github.com/neural-garage/tools |
| max_upload_size | |
| id | 2002650 |
| size | 62,859 |
Shared utilities for Neural Garage code analysis tools
neural-shared provides common functionality for the Neural Garage suite of code analysis tools. It includes:
Language-agnostic parsing infrastructure:
use neural_shared::parser::{Language, PythonParser, Parser};
let parser = PythonParser::new()?;
let source = "def hello(): pass";
let parsed = parser.parse(source, Path::new("example.py"))?;
// Access definitions, usages, and entry points
for def in parsed.definitions {
println!("Found: {} at {}:{}", def.name, def.location.line, def.location.column);
}
Supported languages:
Efficient file system scanning:
use neural_shared::Scanner;
let scanner = Scanner::new(Path::new("./src"));
let files = scanner.scan()?; // Respects .gitignore
Features:
ignore crateGeneric reporting framework with Finding trait:
use neural_shared::report::{Finding, Reporter, JsonReporter};
use serde::Serialize;
#[derive(Serialize)]
struct MyFinding {
// Your finding data
}
impl Finding for MyFinding {
fn kind(&self) -> String { /* */ }
fn name(&self) -> String { /* */ }
// ... other methods
}
let reporter = JsonReporter;
let json = reporter.report(&findings)?;
Built-in reporters:
JsonReporter - LLM-friendly JSON outputMarkdownReporter - Human-readable markdownThis library is part of the Neural Garage monorepo.
Tools using neural-shared:
Licensed under either of:
at your option.
See the main repository for contribution guidelines.