Notions of the NeKernel Primer.
Author: Amlal El Mahrouss (amlal at nekernel dot org)

Citing The Work:

@book{El_Mahrouss_NeKernel_org_Primer,
author = {El Mahrouss, Amlal},
year = 2026,
title = {{Ne.org System Primer.}},
url = {https://src.nekernel.org}
}
    

Resources:


https://github.com/ne-foss-org/src
https://github.com/ne-foss-org/kernel
https://github.com/ne-foss-org/nectar

    

Abstract:

Designing and implementing Low-Level Systems is one of the most challenging tasks in Software Engineering.
NeKernel was designed to give you a head start. Written in modern C++ -- it also make uses of a new programming language called Nectar.

Requirements:

You will need to install:

        - NeBuild
        - CoreUtils
        - Git
        - MinGW/Clang
    

What is a Microkernel?

Think of it as the layer who has the near-minimum needed in order to have what's considered an 'Operating System'.

These includes, but not limited to:

Expanding the Microkernel -- The 'Hello World' DDK.

You will need to link against:

        - libDDK.dll
    

This first exercise will focus on implementing a simple DDK in C, which prints a simple 'Hello, World!' to NeKernel's console output.

Sources:

#include <DriverKit/DriverKit.h>

DDK_EXTERN void simple_kputc(const char ch) {
    char assembled[2] = {0};
    assembled[0]      = ch;
    assembled[1]      = 0;

    ke_call_dispatch("ke_put_string", 2, assembled, 2);
}

DDK_EXTERN void hello_ddk(void) {
    const char* message = "Hello, World!\n";
    
    while (*message != 0) {
        simple_kputc(*message);
        message++;
    }
}
    
One shall use NeBuild to compile the DDK as follow:
nebuild hello_ddk_manifest.{json, toml}
    
Where the manifest files contains the needed metadata to build the DDK driver. Which links against libDDK.dll.

Adding a Kernel Subsystem -- The 'GFXKit'.

Adding a new subsystem is straightforward: add your directory 'GFXKit', include your headers,
add then the directory 'GFX' in 'kernel/src', then include the compilation of the GFX module in the makefiles.
[1] One should be careful to think about whether your subsystem could be part of an existing one, that would avoid reinventing the wheel.
[2] One can visualize a kernel subsystem as such:
Headers:
/GfxKit
    /GPU.h
    /FB.h
    /Packet.h
Sources:
/src/Gfx
    /GPUPacket.cpp
    /FBPacket.cpp
    

Next Steps:

Practicing and experimenting with your distribution of the Ne System is what comes next after this primer,
please read the documentation available at: https://docs.src.nekernel.org as well to learn more. More pages like this will be made available online soon.