rico-scan

Crates.iorico-scan
lib.rsrico-scan
version0.1.2
created_at2024-12-28 15:34:22.543187+00
updated_at2025-01-05 09:43:56.666361+00
descriptionA high-performance CLI tool for parsing and validating Thrift IDL files
homepage
repositoryhttps://github.com/xnmeet/rico
max_upload_size
id1497578
size32,935
(xnmeet)

documentation

https://docs.rs/rico-scan

README

Rico-scan

A high-performance CLI tool for parsing and validating Thrift IDL files, built on top of the Rico parser.

Features

  • 🚀 Fast parallel processing of Thrift files
  • 🎯 Detailed error reporting with source context using miette
  • 📝 Optional JSON AST output
  • 📊 Progress indication with ETA
  • 🎨 Colorful and informative terminal output

Installation

cargo install rico-scan

Usage

Basic Validation

To validate Thrift files without generating output:

rico-scan -p /path/to/thrift/files

Generate JSON AST

To parse files and output JSON AST:

rico-scan -p /path/to/thrift/files -o /path/to/output

Each Thrift file will be parsed into a corresponding JSON file containing its AST.

Features

  • json-output (enabled by default): Enables JSON AST output functionality

Example Output

[=========================>   ] 495/522 (28s)
Done! • ✅ succeeded: 521 • ❌ failed: 1 • ⚡ threads: 8 • ⏱ time: 1.23s

If errors are found, they will be displayed with source context:

Error details:
→ /path/to/file.thrift
<detailed error with source context>

License

This project is licensed under the same terms as Rico.

Commit count: 77

cargo fmt