2026-01-17 18:21:08 +01:00
|
|
|
#ifndef COMMAND_H
|
|
|
|
|
#define COMMAND_H
|
|
|
|
|
|
|
|
|
|
#include "string.h"
|
2026-01-18 16:43:23 +01:00
|
|
|
#include "common.h"
|
2026-01-17 18:21:08 +01:00
|
|
|
|
|
|
|
|
typedef struct Arena Arena;
|
|
|
|
|
typedef struct Discovery Discovery;
|
|
|
|
|
typedef struct Configuration Configuration;
|
|
|
|
|
|
2026-01-18 16:43:23 +01:00
|
|
|
struct CommandOptions
|
|
|
|
|
{
|
|
|
|
|
Arena* a;
|
|
|
|
|
StringPool* sp;
|
|
|
|
|
BuildProfile bp;
|
|
|
|
|
Configuration* c;
|
|
|
|
|
StringView app;
|
|
|
|
|
StringView* files;
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-18 22:39:32 +01:00
|
|
|
struct ProfileResult
|
|
|
|
|
{
|
|
|
|
|
size_t compiler_flags_count;
|
|
|
|
|
StringView* compiler_flags_buf;
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-17 18:21:08 +01:00
|
|
|
struct Command
|
|
|
|
|
{
|
|
|
|
|
Arena* a;
|
|
|
|
|
StringView app;
|
|
|
|
|
const char** args;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct Argument Argument;
|
|
|
|
|
typedef struct Command Command;
|
2026-01-18 16:43:23 +01:00
|
|
|
typedef struct CommandOptions CommandOptions;
|
2026-01-18 22:39:32 +01:00
|
|
|
typedef struct ProfileResult ProfileResult;
|
2026-01-17 18:21:08 +01:00
|
|
|
|
2026-01-18 16:43:23 +01:00
|
|
|
Command command_create_f_to_o(CommandOptions* co);
|
2026-01-18 22:39:32 +01:00
|
|
|
ProfileResult command_get_profile(CommandOptions* co);
|
2026-01-17 18:21:08 +01:00
|
|
|
|
|
|
|
|
int command_run(Command* cmd);
|
|
|
|
|
|
|
|
|
|
#endif
|