-- Globals provided by the lua_wrapper interface (read-only from script perspective).
read_globals = {
  "require_std",
  "m_unresolved_args",
  bcache = {
    fields = {
      append_path = {},
      dir_exists = {},
      file_exists = {},
      get_dir_part = {},
      get_extension = {},
      get_file_info = {},
      get_file_part = {},
      log_debug = {},
      log_error = {},
      log_fatal = {},
      log_info = {},
      log_warning = {},
      parse_json = {},
      resolve_path = {},
      run = {},
      split_args = {},
    }
  },
}

-- Globals that are read/write by the wrapper, plus wrapper interface functions
-- that scripts define at global scope.
globals = {
  -- Synced between wrapper and script.
  "m_args",
  "m_implicit_input_files",

  -- Wrapper interface functions (defined by scripts, called by the wrapper).
  "can_handle_command",
  "finalize_after_hit",
  "get_build_files",
  "get_capabilities",
  "get_hash_extra_content",
  "get_input_files",
  "get_program_id",
  "get_relevant_arguments",
  "get_relevant_env_vars",
  "preprocess_source",
  "resolve_args",
  "run_for_miss",
}
