tree: c109816516404ef0dd29186a245bbd58edf84dfc [path history] [tgz]
  1. add_available_attributes.sh
  2. add_deprecated_syntax.py
  3. convert_fidlc_tests.py
  4. copy_converted_files_from_output.sh
  5. fidl_converter.py
  6. find_nullable_union_fields.py
  7. fix_rust_exhaustive_tables.rs
  8. fix_rust_exhaustive_tables.sh
  9. format_unions.py
  10. ir.py
  11. README.md
  12. simple_unions.py
  13. single_use.py
  14. syntax_coverage_check.py
tools/fidl/scripts/README.md

FIDL scripts

This directory contains scripts used by FIDL contributors. When writing a script, consider saving it here if there is any chance it could be reused, including being used as a reference for future scripts. All scripts must be documented in this file.

find_nullable_union_fields.py

This script analyzes all .fidl files in the fuchsia repository and reports occurrences of nullable fields in unions.

fix_rust_exhaustive_tables.sh

This script (1) changes FIDL table initializers to use the functional update syntax MyTable { /* ... */, ..MyTable::empty() }, and (2) changes patterns to use MyTable { /* ... */, .. }. It does this by parsing build errors with awk and then processing them with a Rust program executed using rust-script.

simple_unions.py, single_use.py, ir.py

These are scripts that are useful for analyzing the corpus of FIDL libraries in the Fuchsia tree. They operate on the .fidl.json IR in the out directory. They should be run with fx exec SCRIPTNAME so that they can find the out directory.

The library ir.py finds and parses the IR files and makes them available in a somewhat pythonic interface.