#thrift #idl #parser #validation #cli #command-line-tool

app rico-scan

A high-performance CLI tool for parsing and validating Thrift IDL files

5 releases

new 0.1.1 Jan 2, 2025
0.1.1-alpha.1 Dec 29, 2024
0.1.0 Dec 28, 2024

#278 in Parser implementations

Download history 175/week @ 2024-12-25

175 downloads per month

MIT license

115KB
2K SLoC

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.

Dependencies

~9–18MB
~228K SLoC