3 KiB
3 KiB
GRBC datatypes
PackageConfig
struct PackageConfig {
/// Name of the package
string name;
/// List of libraries to include
Array<TargetInfo> libraries;
/// List of include directories
Array<path> include_dirs;
/// Extra compiler flags
Array<string> compile_flags;
/// Extra linker flags
Array<string> linker_flags;
};
Package
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
struct LibraryConfig {
/// Name of the library
string name;
/// List of files to compile
Array<path> files;
/// Type of library
LibraryType lib_type;
/// Package config for the library, leave empty to disable
PackageConfig package_config{};
/// Requirments of the library
Array<Package> requirements;
/// Compiler flags
Array<string> compile_flags;
/// Linker flags
Array<string> linker_flags;
/// Include directories
Array<string> include_dirs;
};
LibraryType
enum LibraryType {
LibraryType_Shared,
LibraryType_Static
};
ExecutableConfig
struct ExecutableConfig {
/// Name of the executable
string name;
/// Type of language
LanguageType language_type;
/// List of files to compile
Array<path> files;
/// Requirments of the executable
Array<Package> requirements;
/// Compiler flags
Array<string> compile_flags;
/// Linker flags
Array<string> linker_flags;
/// Include directories
Array<string> include_dirs;
};
TargetInfo
struct TargetInfo {
/// Name of the target
string name;
/// List of compile commands for this target. should produce an executable, or library.
Array<string> compile_commands;
};
PlatformType
enum PlatformType {
PlatformType_Win32,
PlatformType_Linux
};
GlobalConfig
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;
};
OptionalFileType
enum OptionalFileType {
OFileType_IsWin32,
OFileType_IsUnix,
OFileType_IsLinux
};
Platform
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
enum LanguageType {
LanguageType_CPP,
LanguageType_C
};
Profile
struct Profile {
string name;
Array<string> compiler_flags;
Array<string> linker_flags;
};