poka.sh

Docs

THRIFT

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

Thrift IDL Preview.

At a glance

Purpose An Apache Thrift IDL file: services, structs, enums and constants that define an RPC interface and its data types.
Extensions .thrift
Poka parser poka-thrift
Viewer poka-tree-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B2 Broad (see Breadth tiers)

How much Poka reads

B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-thrift/src/main.rs (1046 lines, a brace- and comment-aware scanner) and plugin.json. No unit tests or tests/samples.rs; the corpus has DocTest.thrift, ThriftTest.thrift but no test reads them. Covers .thrift. The tree has namespaces, includes and counts, services with methods (oneway, return type, arguments; extends), structs, unions and exceptions with fields (id, required or optional, type, name), enums with values, typedefs and constants.

What Poka does not read

  • Field default values are dropped
  • Constants are listed by name only (no type or value)
  • Typedefs are listed by alias only (the target type is not shown)
  • throws clauses are dropped from method signatures
  • Includes are listed but not followed
  • Caps of 200 fields per definition and 3,000 nodes; files over 32 MiB are cut (flagged)

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • thrift-parser (candidate; MIT; Rust; https://github.com/ihciah/thrift-parser) — nom-based Thrift IDL parser, version 0.0.5; licence from Cargo.toml and lib.rs, sparse documentation.
  • rico (candidate; MIT; Rust; https://github.com/xnmeet/rico) — Logos lexer plus recursive-descent parser converting Thrift IDL to a JSON AST; licence from the lib.rs page.
  • Apache Thrift compiler (candidate; Apache-2.0; C++; https://github.com/apache/thrift) — Reference compiler reads .thrift definitions to generate code; the page does not describe the parser itself.
  • thrift-weaver (candidate; MIT; Go; https://github.com/kpumuk/thrift-weaver) — Formatter, linter and LSP for .thrift using an embedded WASM parser built from its tree-sitter-thrift grammar.
  • pilota-thrift-parser (candidate; MIT OR Apache-2.0; Rust; https://github.com/cloudwego/pilota) — Pilota thrift Parser.; v0.13.7, updated 2026-07-29; matched on lib.rs, not tested

Sources

  • parsers/poka-thrift/src/main.rs
  • parsers/poka-thrift/plugin.json