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

app rico-scan

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

6 releases

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

#258 in Parser implementations

Download history 142/week @ 2024-12-23 255/week @ 2024-12-30 56/week @ 2025-01-06

453 downloads per month

MIT license

110KB
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

~10–19MB
~229K SLoC