Some checks failed
CI / build-test-release (push) Failing after 5m36s
Canonical LGPL-3.0-only text, GPL-3.0 companion, SPDX headers on all first-party sources, MIT for examples/. Vendored lib/ untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
30 lines
No EOL
1.2 KiB
C++
30 lines
No EOL
1.2 KiB
C++
//SPDX-License-Identifier: LGPL-3.0-only
|
|
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
module;
|
|
#include "Crafter.Build-Api.h"
|
|
export module Crafter.Build:Platform;
|
|
import std;
|
|
namespace fs = std::filesystem;
|
|
|
|
namespace Crafter {
|
|
struct Configuration;
|
|
struct CommandResult {
|
|
int exitCode = 0;
|
|
std::string output;
|
|
bool crashed = false;
|
|
bool timedOut = false;
|
|
int signal = 0;
|
|
};
|
|
std::string BuildStdPcm(const Configuration& config, fs::path stdPcm);
|
|
fs::path GetCacheDir();
|
|
std::string RunCommand(const std::string_view command);
|
|
CommandResult RunCommandChecked(std::string_view command);
|
|
export CRAFTER_API CommandResult RunCommandWithTimeout(std::string_view command, std::chrono::seconds timeout);
|
|
std::string GetBaseCommand(const Configuration& config);
|
|
export CRAFTER_API Configuration LoadProject(const fs::path& projectFile, std::span<const std::string_view> args);
|
|
// Resolves the directory holding distributed runtime assets (Crafter.Build
|
|
// module sources, wasi-runtime/, etc). Honors CRAFTER_BUILD_HOME; otherwise
|
|
// derives <prefix>/share/crafter-build from the running executable's path.
|
|
export CRAFTER_API fs::path GetCrafterBuildHome();
|
|
} |