Add DEVELOPMENT.md
This commit is contained in:
63
docs/DEVELOPMENT.md
Normal file
63
docs/DEVELOPMENT.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Development Guide
|
||||
|
||||
This document provides information for developers working on the video_probe project.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Rust 1.70+ (https://rustup.rs/)
|
||||
- FFmpeg/ffprobe (for probing video files)
|
||||
|
||||
## Build Commands
|
||||
|
||||
```bash
|
||||
# Debug build
|
||||
cargo build
|
||||
|
||||
# Release build
|
||||
cargo build --release
|
||||
|
||||
# Run tests
|
||||
cargo test
|
||||
|
||||
# Format code
|
||||
cargo fmt
|
||||
|
||||
# Run linter
|
||||
cargo clippy
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
video_probe/
|
||||
├── src/
|
||||
│ ├── main.rs # CLI entry point
|
||||
│ ├── lib.rs # Library interface
|
||||
│ ├── error.rs # Error types
|
||||
│ ├── metadata.rs # Data structures
|
||||
│ ├── probe.rs # ffprobe execution
|
||||
│ ├── parser.rs # JSON parsing
|
||||
│ └── output.rs # Output formatting
|
||||
├── docs/
|
||||
│ ├── DEVELOPMENT.md
|
||||
│ ├── USAGE.md
|
||||
│ └── API.md
|
||||
├── Cargo.toml
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Code Conventions
|
||||
|
||||
- Structs/Enums: PascalCase (e.g., VideoMetadata)
|
||||
- Functions/Methods: snake_case (e.g., probe_video)
|
||||
- Variables: snake_case (e.g., video_path)
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
cargo test
|
||||
|
||||
# Run with output
|
||||
cargo test -- --nocapture
|
||||
```
|
||||
Reference in New Issue
Block a user