summaryrefslogtreecommitdiffhomepage
path: root/BTBKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-17 07:32:30 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-17 07:36:57 +0100
commit20252df698106283d15ddf7d53f4e0dd9462666d (patch)
treebf77733ab5fddd3f09962cde9a22e9f1d485b6c9 /BTBKit
parentcaecbd4e6eb2877b7e9bdd4fb2e4f3e370b336c9 (diff)
refactor! Lots of breaking changes to the codebase.
feat: Rename ‘btb‘ to ‘nebuild‘ to match nekernel.org's naming scheme. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'BTBKit')
-rw-r--r--BTBKit/IManifestBuilder.h32
-rw-r--r--BTBKit/Includes.h17
-rw-r--r--BTBKit/JSONManifestBuilder.h30
-rw-r--r--BTBKit/Macros.h34
4 files changed, 0 insertions, 113 deletions
diff --git a/BTBKit/IManifestBuilder.h b/BTBKit/IManifestBuilder.h
deleted file mode 100644
index e11d431..0000000
--- a/BTBKit/IManifestBuilder.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// ============================================================= //
-// btb
-// Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-// ============================================================= //
-
-#pragma once
-
-#include <BTBKit/Includes.h>
-#include <BTBKit/Macros.h>
-
-#define BTB_MANIFEST_BUILDER : public BTB::IManifestBuilder
-
-namespace BTB {
-/// @brief Builder interface class.
-/// @note This class is meant to be used as an interface.
-class IManifestBuilder {
- public:
- IManifestBuilder() = default;
- virtual ~IManifestBuilder() = default;
-
- IManifestBuilder& operator=(const IManifestBuilder&) = default;
- IManifestBuilder(const IManifestBuilder&) = default;
-
- /// @brief Builds a target using the implemented laguage.
- /// @param arg_sz filename size
- /// @param arg_val filename path.
- /// @retval true succeeded.
- /// @retval false failed.
- virtual bool buildTarget(int arg_sz, const char* arg_val, const bool dry_run = false) = 0;
- virtual const char* buildSystem() = 0;
-};
-} // namespace BTB \ No newline at end of file
diff --git a/BTBKit/Includes.h b/BTBKit/Includes.h
deleted file mode 100644
index 3695d53..0000000
--- a/BTBKit/Includes.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// ============================================================= //
-// btb
-// Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-// ============================================================= //
-
-#ifndef BTB_INCLUDES_H
-#define BTB_INCLUDES_H
-
-#include <cstddef>
-#include <cstdio>
-#include <fstream>
-#include <iostream>
-#include <sstream>
-#include <string>
-#include <thread>
-
-#endif // BTB_INCLUDES_H
diff --git a/BTBKit/JSONManifestBuilder.h b/BTBKit/JSONManifestBuilder.h
deleted file mode 100644
index f5d874c..0000000
--- a/BTBKit/JSONManifestBuilder.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// ============================================================= //
-// btb
-// Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-// ============================================================= //
-
-#pragma once
-
-#include <BTBKit/IManifestBuilder.h>
-#include <json.h>
-
-namespace BTB {
-/// @brief JSON builder
-class JSONManifestBuilder final BTB_MANIFEST_BUILDER {
- public:
- JSONManifestBuilder() = default;
- ~JSONManifestBuilder() override = default;
-
- JSONManifestBuilder& operator=(const JSONManifestBuilder&) = default;
- JSONManifestBuilder(const JSONManifestBuilder&) = default;
-
- public:
- /// @brief Builds a JSON target.
- /// @param arg_sz filename size
- /// @param arg_val filename path.
- /// @retval true build succeeded.
- /// @retval false failed to build.
- bool buildTarget(int arg_sz, const char* arg_val, const bool dry_run = false) override;
- const char* buildSystem() override;
-};
-} // namespace BTB \ No newline at end of file
diff --git a/BTBKit/Macros.h b/BTBKit/Macros.h
deleted file mode 100644
index c2d6194..0000000
--- a/BTBKit/Macros.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// ============================================================= //
-// btb
-// Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
-// ============================================================= //
-
-#pragma once
-
-extern "C" {
-#include <assert.h>
-}
-
-#include <rang.h>
-
-#define LIKELY(ARG) ((ARG) ? assert(false) : ((void) 0))
-#define UNLIKELY(ARG) LIKELY(!(ARG))
-
-#define LIBBTB_VERSION "v0.0.1-libBTB"
-
-#define LIBBTB_VERSION_BCD 0x0001
-
-#define LIBBTB_VERSION_MAJOR 1
-#define LIBBTB_VERSION_MINOR 1
-#define LIBBTB_VERSION_PATCH 0
-
-#define LIBBTB_UNUSED(X) ((void) X)
-
-namespace BTB::Logger {
-/// @brief replacement for std::cout for BTB logging.
-inline std::ostream& info() noexcept {
- auto& out = std::cout;
- out << rang::fg::red << "btb: " << rang::style::reset;
- return out;
-}
-} // namespace BTB::Logger