From 5f12929a80c6cc03bff075be7e1b8dc74cd0f2c4 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 27 Mar 2026 09:06:08 +0100 Subject: [FEAT] frameworks: Update frameworks code, adding new `libSocket` framework. Signed-off-by: Amlal El Mahrouss --- CITATION.cff | 6 ++--- README.md | 10 +++---- frameworks/libSocket.fwrk/dist/.keep | 0 frameworks/libSocket.fwrk/headers/Config.h | 18 +++++++++++++ frameworks/libSocket.fwrk/libSocket.fwrk.json | 20 ++++++++++++++ frameworks/libSocket.fwrk/src/.keep | 0 frameworks/libSocket.fwrk/xml/app.xml | 4 +++ frameworks/libThread.fwrk/headers/Config.h | 2 +- frameworks/libThread.fwrk/src/ThreadMgr.cpp | 2 +- frameworks/libX11.fwrk/headers/Config.h | 2 +- frameworks/libX11.fwrk/src/X11ConnMgr.cpp | 2 +- include/.sdk_map | 2 +- include/ne-system/.sdk_map | 4 +++ include/ne-system/Drivers/DDK.h | 11 ++++++++ include/ne-system/Drivers/Detail/Config.h | 19 ++++++++++++++ include/ne-system/System/Detail/Config.h | 20 ++++++++++++++ include/ne-system/System/NeSystem.h | 33 ++++++++++++++++++++++++ include/ne-system/System/WindowSystems/Wayland.h | 13 ++++++++++ include/ne-system/System/WindowSystems/X11.h | 28 ++++++++++++++++++++ include/ne_system/.sdk_map | 4 --- include/ne_system/Drivers/DDK.h | 11 -------- include/ne_system/Drivers/Detail/Config.h | 19 -------------- include/ne_system/System/Detail/Config.h | 20 -------------- include/ne_system/System/NeSystem.h | 33 ------------------------ include/ne_system/System/WindowSystems/Wayland.h | 13 ---------- include/ne_system/System/WindowSystems/X11.h | 28 -------------------- src/ne_system/.keep | 0 src/src/.keep | 0 28 files changed, 183 insertions(+), 141 deletions(-) create mode 100644 frameworks/libSocket.fwrk/dist/.keep create mode 100644 frameworks/libSocket.fwrk/headers/Config.h create mode 100644 frameworks/libSocket.fwrk/libSocket.fwrk.json create mode 100644 frameworks/libSocket.fwrk/src/.keep create mode 100644 frameworks/libSocket.fwrk/xml/app.xml create mode 100644 include/ne-system/.sdk_map create mode 100644 include/ne-system/Drivers/DDK.h create mode 100644 include/ne-system/Drivers/Detail/Config.h create mode 100644 include/ne-system/System/Detail/Config.h create mode 100644 include/ne-system/System/NeSystem.h create mode 100644 include/ne-system/System/WindowSystems/Wayland.h create mode 100644 include/ne-system/System/WindowSystems/X11.h delete mode 100644 include/ne_system/.sdk_map delete mode 100644 include/ne_system/Drivers/DDK.h delete mode 100644 include/ne_system/Drivers/Detail/Config.h delete mode 100644 include/ne_system/System/Detail/Config.h delete mode 100644 include/ne_system/System/NeSystem.h delete mode 100644 include/ne_system/System/WindowSystems/Wayland.h delete mode 100644 include/ne_system/System/WindowSystems/X11.h delete mode 100644 src/ne_system/.keep create mode 100644 src/src/.keep diff --git a/CITATION.cff b/CITATION.cff index adf99a4..ee1c0fa 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,11 +9,11 @@ authors: identifiers: - type: url value: 'https://nekernel.org' - description: Ne.org System -repository-code: 'https://github.com/ne-foss-org/ne_system' + description: THe Ne.org NeSystem Server OS. +repository-code: 'https://github.com/ne-foss-org/ne-system' url: 'https://nekernel.org' abstract: >- - This is the Ne.org System. Built upon its papers and frameworks. + This is the Ne.org NeSystem. Built upon its papers and frameworks. keywords: - kernel - operating-systems diff --git a/README.md b/README.md index 6f32352..305d454 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ License ![GitHub Repo stars](https://img.shields.io/github/stars/ne-foss-org/ne-system) -# About: +## About: -An OS that aims to provide an alternative for backend systems. (Edge Computing, Storage Systems, etc.) made to be easily deployable and forkable as well. +An OS that aims to provide an alternative for backend systems. (Edge Compute, Web Servers, Backend Servers, Storage Systems, etc.) made to be easily deployable and forkable as well. ## Getting Started: @@ -27,17 +27,17 @@ Please follow the the tutorials in `/src/reference` to get started. curl -fsSL http://install.nekernel.org | sh ``` -### Full installation: +### Full Installation: Please clone the repository using Git: ```sh -git clone --recurse-submodules -j8 git@github.com:ne-foss-org/ne_system.git +git clone --recurse-submodules -j8 git@github.com:ne-foss-org/ne-system.git ``` And have a look at the wiki, docs, and primers. They have valuable resources to get started. -## Read the primers! +## Primers: The primers are available at: diff --git a/frameworks/libSocket.fwrk/dist/.keep b/frameworks/libSocket.fwrk/dist/.keep new file mode 100644 index 0000000..e69de29 diff --git a/frameworks/libSocket.fwrk/headers/Config.h b/frameworks/libSocket.fwrk/headers/Config.h new file mode 100644 index 0000000..ca38da0 --- /dev/null +++ b/frameworks/libSocket.fwrk/headers/Config.h @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/ne-system + +#ifndef SOCKET_FOUNDATION_H +#define SOCKET_FOUNDATION_H + +#include + +#define LIBSOCKET_VERSION 0x100000 + +#define _SOCKET_ARRAY_CHECK(PTR) PTR != nullptr +#define _SOCKET_ARRAY_INDEX(ARR, PTR, LEN) ARR[((SInt64) PTR) % LEN] + +#define _SOCKET_INVALID ((SizeT)-1) + +#endif diff --git a/frameworks/libSocket.fwrk/libSocket.fwrk.json b/frameworks/libSocket.fwrk/libSocket.fwrk.json new file mode 100644 index 0000000..a1b13bb --- /dev/null +++ b/frameworks/libSocket.fwrk/libSocket.fwrk.json @@ -0,0 +1,20 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "./", "../../src/kernel", "../../src/kernel/src"], + "sources_path": ["src/*.cpp"], + "output_name": "./dist/libSocket.fwrk.dylib", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + "-Wl,--subsystem=17" + ], + "cpp_macros": [ + "kSocketVersion=0x0100", + "kSocketVersionHighest=0x0100", + "kSocketVersionLowest=0x0100" + ] + } + diff --git a/frameworks/libSocket.fwrk/src/.keep b/frameworks/libSocket.fwrk/src/.keep new file mode 100644 index 0000000..e69de29 diff --git a/frameworks/libSocket.fwrk/xml/app.xml b/frameworks/libSocket.fwrk/xml/app.xml new file mode 100644 index 0000000..bd1dbee --- /dev/null +++ b/frameworks/libSocket.fwrk/xml/app.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frameworks/libThread.fwrk/headers/Config.h b/frameworks/libThread.fwrk/headers/Config.h index f69f0f5..f8f5dab 100644 --- a/frameworks/libThread.fwrk/headers/Config.h +++ b/frameworks/libThread.fwrk/headers/Config.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system +// Official repository: https://github.com/ne-foss-org/ne-system #ifndef LIBTHREAD_FOUNDATION_H #define LIBTHREAD_FOUNDATION_H diff --git a/frameworks/libThread.fwrk/src/ThreadMgr.cpp b/frameworks/libThread.fwrk/src/ThreadMgr.cpp index 6a7843f..7d663d3 100644 --- a/frameworks/libThread.fwrk/src/ThreadMgr.cpp +++ b/frameworks/libThread.fwrk/src/ThreadMgr.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system +// Official repository: https://github.com/ne-foss-org/ne-system #include #include diff --git a/frameworks/libX11.fwrk/headers/Config.h b/frameworks/libX11.fwrk/headers/Config.h index 1207451..30bb449 100644 --- a/frameworks/libX11.fwrk/headers/Config.h +++ b/frameworks/libX11.fwrk/headers/Config.h @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system +// Official repository: https://github.com/ne-foss-org/ne-system #ifndef X11_FOUNDATION_H #define X11_FOUNDATION_H diff --git a/frameworks/libX11.fwrk/src/X11ConnMgr.cpp b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp index 61752f1..ca55c8b 100644 --- a/frameworks/libX11.fwrk/src/X11ConnMgr.cpp +++ b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system +// Official repository: https://github.com/ne-foss-org/ne-system #include diff --git a/include/.sdk_map b/include/.sdk_map index 43c8be8..9b61f77 100644 --- a/include/.sdk_map +++ b/include/.sdk_map @@ -1,5 +1,5 @@ [NeSystem] -ne_system +ne-system [MailDel] maildev [HttpServer] diff --git a/include/ne-system/.sdk_map b/include/ne-system/.sdk_map new file mode 100644 index 0000000..da79ef9 --- /dev/null +++ b/include/ne-system/.sdk_map @@ -0,0 +1,4 @@ +[DDK] +Drivers +[User] +System \ No newline at end of file diff --git a/include/ne-system/Drivers/DDK.h b/include/ne-system/Drivers/DDK.h new file mode 100644 index 0000000..6503969 --- /dev/null +++ b/include/ne-system/Drivers/DDK.h @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/src + +#ifndef _NE_DDK_DDK_H_ +#define _NE_DDK_DDK_H_ + +#include + +#endif // _NE_DDK_DDK_H_ diff --git a/include/ne-system/Drivers/Detail/Config.h b/include/ne-system/Drivers/Detail/Config.h new file mode 100644 index 0000000..cb788d6 --- /dev/null +++ b/include/ne-system/Drivers/Detail/Config.h @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/src + +#ifndef _NE_DDK_CONFIG_H_ +#define _NE_DDK_CONFIG_H_ + +#define _ARCH __ne_arch + +#define _SUBSYSTEM_NET 0x1000 +#define _SUBSYSTEM_DDK 0x1000 +#define _SUBSYSTEM_SYS 0x1000 + +#define _NEKERNEL 202603L + +#include + +#endif diff --git a/include/ne-system/System/Detail/Config.h b/include/ne-system/System/Detail/Config.h new file mode 100644 index 0000000..474a107 --- /dev/null +++ b/include/ne-system/System/Detail/Config.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/src + +#pragma once + +#define _ARCH __ne_arch + +#define _SUBSYSTEM_NET 0x1000 +#define _SUBSYSTEM_DDK 0x1000 +#define _SUBSYSTEM_SYS 0x1000 + +#define _NEKERNEL 202603L + +#include +#include +#include + + diff --git a/include/ne-system/System/NeSystem.h b/include/ne-system/System/NeSystem.h new file mode 100644 index 0000000..8bc5063 --- /dev/null +++ b/include/ne-system/System/NeSystem.h @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/ne-system + +#ifndef _SYSTEM_NE_SYSTEM_H_ +#define _SYSTEM_NE_SYSTEM_H_ + +#define _NE_SYSTEM 202603L + +#include + +/// @brief POSIX wrapper API +#include + +/// @brief IPC API +#include + +/// @brief System calls API +#include + +/// @brief Sound mixer API +#include + +#ifdef _NE_NEED_X11 +#include +#endif + +#ifdef _NE_NEED_WAYLAND +#include +#endif + +#endif // _SYSTEM_NE_SYSTEM_H_ diff --git a/include/ne-system/System/WindowSystems/Wayland.h b/include/ne-system/System/WindowSystems/Wayland.h new file mode 100644 index 0000000..85fe66a --- /dev/null +++ b/include/ne-system/System/WindowSystems/Wayland.h @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/src + +#ifndef _SYSTEM_NE_WAYLAND_H_ +#define _SYSTEM_NE_WAYLAND_H_ + +#define _NE_WAYLAND_SYSTEM 202603L + +#include + +#endif // _SYSTEM_NE_WAYLAND_H_ \ No newline at end of file diff --git a/include/ne-system/System/WindowSystems/X11.h b/include/ne-system/System/WindowSystems/X11.h new file mode 100644 index 0000000..e8bf997 --- /dev/null +++ b/include/ne-system/System/WindowSystems/X11.h @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/src + +#ifndef _SYSTEM_NE_X11_H_ +#define _SYSTEM_NE_X11_H_ + +#define _NE_X11_SYSTEM 202603L + +struct XFCURSOR; // Cursor struct +struct XFDISPLAY; // Display struct +struct XFCONN; // Connection struct + +typedef struct XFCURSOR* XcursorImage; +typedef struct XFCURSOR** XcursorCursors; + +/// @brief NeSystem Header. +#include + +/// @brief Defs of the X11 protocol. +#include + +/// @brief XDG' extensions of the X11 protocol. +#include + +#endif // _SYSTEM_NE_X11_H_ + diff --git a/include/ne_system/.sdk_map b/include/ne_system/.sdk_map deleted file mode 100644 index da79ef9..0000000 --- a/include/ne_system/.sdk_map +++ /dev/null @@ -1,4 +0,0 @@ -[DDK] -Drivers -[User] -System \ No newline at end of file diff --git a/include/ne_system/Drivers/DDK.h b/include/ne_system/Drivers/DDK.h deleted file mode 100644 index 5bb45f5..0000000 --- a/include/ne_system/Drivers/DDK.h +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/src - -#ifndef _NE_DDK_DDK_H_ -#define _NE_DDK_DDK_H_ - -#include - -#endif // _NE_DDK_DDK_H_ diff --git a/include/ne_system/Drivers/Detail/Config.h b/include/ne_system/Drivers/Detail/Config.h deleted file mode 100644 index cb788d6..0000000 --- a/include/ne_system/Drivers/Detail/Config.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/src - -#ifndef _NE_DDK_CONFIG_H_ -#define _NE_DDK_CONFIG_H_ - -#define _ARCH __ne_arch - -#define _SUBSYSTEM_NET 0x1000 -#define _SUBSYSTEM_DDK 0x1000 -#define _SUBSYSTEM_SYS 0x1000 - -#define _NEKERNEL 202603L - -#include - -#endif diff --git a/include/ne_system/System/Detail/Config.h b/include/ne_system/System/Detail/Config.h deleted file mode 100644 index 474a107..0000000 --- a/include/ne_system/System/Detail/Config.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/src - -#pragma once - -#define _ARCH __ne_arch - -#define _SUBSYSTEM_NET 0x1000 -#define _SUBSYSTEM_DDK 0x1000 -#define _SUBSYSTEM_SYS 0x1000 - -#define _NEKERNEL 202603L - -#include -#include -#include - - diff --git a/include/ne_system/System/NeSystem.h b/include/ne_system/System/NeSystem.h deleted file mode 100644 index de13c6c..0000000 --- a/include/ne_system/System/NeSystem.h +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system - -#ifndef _SYSTEM_NE_SYSTEM_H_ -#define _SYSTEM_NE_SYSTEM_H_ - -#define _NE_SYSTEM 202603L - -#include - -/// @brief POSIX wrapper API -#include - -/// @brief IPC API -#include - -/// @brief System calls API -#include - -/// @brief Sound mixer API -#include - -#ifdef _NE_NEED_X11 -#include -#endif - -#ifdef _NE_NEED_WAYLAND -#include -#endif - -#endif // _SYSTEM_NE_SYSTEM_H_ diff --git a/include/ne_system/System/WindowSystems/Wayland.h b/include/ne_system/System/WindowSystems/Wayland.h deleted file mode 100644 index f85fe59..0000000 --- a/include/ne_system/System/WindowSystems/Wayland.h +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/src - -#ifndef _SYSTEM_NE_WAYLAND_H_ -#define _SYSTEM_NE_WAYLAND_H_ - -#define _NE_WAYLAND_SYSTEM 202603L - -#include - -#endif // _SYSTEM_NE_WAYLAND_H_ \ No newline at end of file diff --git a/include/ne_system/System/WindowSystems/X11.h b/include/ne_system/System/WindowSystems/X11.h deleted file mode 100644 index 718b29e..0000000 --- a/include/ne_system/System/WindowSystems/X11.h +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/src - -#ifndef _SYSTEM_NE_X11_H_ -#define _SYSTEM_NE_X11_H_ - -#define _NE_X11_SYSTEM 202603L - -struct XFCURSOR; // Cursor struct -struct XFDISPLAY; // Display struct -struct XFCONN; // Connection struct - -typedef struct XFCURSOR* XcursorImage; -typedef struct XFCURSOR** XcursorCursors; - -/// @brief NeSystem Header. -#include - -/// @brief Defs of the X11 protocol. -#include - -/// @brief XDG' extensions of the X11 protocol. -#include - -#endif // _SYSTEM_NE_X11_H_ - diff --git a/src/ne_system/.keep b/src/ne_system/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/src/src/.keep b/src/src/.keep new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3