#binary-data #reverse-engineering #data-analysis #schema-file #binary-file #parser

carta-schema

Parse a schema file. Apply the schema to binary data for exploration and visualisation

2 stable releases

1.0.1 Jun 19, 2022
1.0.0 Jun 25, 2019

#422 in Visualization

GPL-3.0-or-later

81KB
2K SLoC

carta-schema

CircleCI codecov.io Dependabot Status

Backend for the Carta binary file analysis tool


lib.rs:

  • Compiler - Compile .carta schema files into a usable internal representation that can be
  • applied to binary files.
  • Stages of compilation:
  • Tokenisation Split the input file into Tokens
  •  |
    
  •  V
    
  • Parsing Extract file structure definitions. Returns a schema object that contains
  •  |              a list of the structs, in the order they appeared in the input file.
    
  •  V
    
  • Type checking Uses the StructDefns and builtin types to do type checking. Returns
  •  |              a tschema object with type checked types.
    
  •  V
    
  • Correctness Checks Final checks on the schema.
  •  |               - Root element is correctly present
    
  •  |               - Array lengths can be calculated
    
  •  V
    
  • Final schema

Dependencies

~1.5–2MB
~45K SLoC