Devgen Splitter is a Rust tool that breaks down source code into meaningful parts. It uses special language rules to understand code structure in different programming languages and creates helpful descriptions to show how different pieces of code relate to each other.
Features
- Language-aware code splitting
- Identification of code entities (classes, functions, methods, etc.)
- Flexible chunking options
- Support for multiple programming languages
- Contextual header generation based on the relationship between entities
Usage
Add to your Cargo.toml:
cargo add devgen-splitter
Basic example:
use ;
let code = "fn main() { println!(\"Hello, world!\"); }";
let options = SplitOptions ;
let chunks = split.unwrap;
for chunk in chunks
Supported Languages
- Rust
- TypeScript
- Java
- Python
- Go
- C++
- C#
- PHP
- SQL
- Ruby
- Bash
- MD
More languages coming soon!
Development Status
Devgen Splitter is in active development. We welcome community contributions and feedback.