# GRBC datatypes ## PackageConfig ```c++ struct PackageConfig { /// Name of the package string name; /// List of libraries to include Array libraries; /// List of include directories Array include_dirs; /// Extra compiler flags Array compile_flags; /// Extra linker flags Array linker_flags; }; ``` ## Package ```c++ struct Package { /// Name of the package string name; /// File path to the compiled library string file_name; /// Compiler flags used in this package string compile_flags; /// Linker flags used in this package string linker_flags; }; ``` ## LibraryConfig ```c++ struct LibraryConfig { /// Name of the library string name; /// List of files to compile Array files; /// Type of library LibraryType lib_type; /// Package config for the library, leave empty to disable PackageConfig package_config{}; /// Requirments of the library Array requirements; /// Compiler flags Array compile_flags; /// Linker flags Array linker_flags; /// Include directories Array include_dirs; }; ``` ## LibraryType ```c++ enum LibraryType { LibraryType_Shared, LibraryType_Static }; ``` ## ExecutableConfig ```c++ struct ExecutableConfig { /// Name of the executable string name; /// Type of language LanguageType language_type; /// List of files to compile Array files; /// Requirments of the executable Array requirements; /// Compiler flags Array compile_flags; /// Linker flags Array linker_flags; /// Include directories Array include_dirs; }; ``` ## TargetInfo ```c++ struct TargetInfo { /// Name of the target string name; /// List of compile commands for this target. should produce an executable, or library. Array compile_commands; }; ``` ## PlatformType ```c++ enum PlatformType { PlatformType_Win32, PlatformType_Linux }; ``` ## GlobalConfig ```c++ struct GlobalConfig { /// Version of the grbc executable string engine_version; /// Architecture string string architecture; /// Platform to target (pulled from the target config) PlatformTarget target; /// Path to the platform.hcfg, in_memory if not on-disk string platform_config; }; ``` ## Platform ```c++ struct Platform { /// Name of the platform string name; /// C++ compiler string cxx_compiler; /// C compiler string cc_compiler; /// Do these compilers produce 32bit code? bool is_64bit; /// Type of the platform PlatformType platform_type; }; ``` ## LanguageType ```c++ enum LanguageType { LanguageType_CPP, LanguageType_C }; ``` ## TaskConfig ```c++ struct TaskConfig { /// Name of the task, can have spaces unlike task_id string task_name; /// ID used when invoking the task, ex: ```ninja task:helloworld``` string task_id; /// Shell script to be executed when this task is called string shell_script; }; ```