feat: Expand C++17 kernel subsystem with OOP device framework, containers, and benchmark engine

- Implement modern freestanding C++17 containers (Vector<T>, UniquePtr<T>, String) in kernel/cpp/cpp_containers.hpp
- Implement object-oriented Device driver model (Device, BlockDevice, CharDevice, VirtualRamDiskDevice, VirtualNullDevice, VirtualZeroDevice, DeviceManager) in kernel/cpp/cpp_device.hpp and kernel/cpp/cpp_device.cpp
- Add C++ kernel performance microbenchmark suite in kernel/cpp/cpp_bench.cpp
- Export C-FFI bridges and add cross-architecture fallbacks in kernel/cpp/cpp_fallback.c and include/kernel/cpp_kernel.h
- Add LazyBox applets: 'cppdevs' and 'cppbench'
- Update README.md documentation and command matrix
This commit is contained in:
subhobhai943 committed 2026-08-21 02:11:44 +05:30
1 parent 03d68a9466
commit 1c09408287
11 files changed
+696 -4

No files matched your search

+5 -3
View File
@@ -29,8 +29,10 @@
- ⚡ **Freestanding C++17 OOP Kernel Engine (`kernel/cpp/`)**:
- **Bare-Metal C++ Runtime**: `operator new`/`delete`, sized deallocation, placement `new`, pure virtual handlers (`__cxa_pure_virtual`), and `.init_array` global constructor dispatcher.
- **Object-Oriented Subsystems**: Polymorphic `AbstractKernelService` hierarchy with runtime virtual method dispatch, RAII, dynamic memory management, and template-based fixed ring buffers (`FixedRingBuffer`).
- **Interactive C++ Commands**: `cppinfo` (Kernel telemetry & status) and `cpptest` (Polymorphic dispatch & dynamic allocation verifier).
- **Modern Generic Containers**: Pure freestanding `Vector<T>`, `UniquePtr<T>` (with polymorphic converting constructors and custom deleters), dynamic `String`, and move semantics (`kernel::move`, `kernel::forward`).
- **Object-Oriented Device Driver Model**: Abstract `Device` base class with `BlockDevice`, `CharDevice`, `VirtualRamDiskDevice` (512B sector emulator), and `VirtualNull`/`VirtualZero` concrete classes managed by the `DeviceManager` singleton.
- **C++ Microbenchmark Engine**: Validates zero-overhead abstractions, virtual method dynamic dispatch latency across 500,000 iterations, and dynamic container throughput.
- **Interactive C++ Commands**: `cppinfo` (Kernel telemetry), `cppdevs` (OOP device tree), `cppbench` (Microbenchmarks), and `cpptest` (Polymorphic dispatch verifier).
- 🐍 **Interactive In-Kernel Snake Game (`userland/lazybox/snake.c`)**:
- Full-featured ANSI terminal game featuring real-time keyboard control (`WASD` and Arrow keys), dynamic food generation, score counter, body growth, wall/self collision detection, and autonomous simulation mode (`snake --demo`).
- 🔮 **SUB Programming Language Kernel Signature & In-Kernel VM (`sub/` & `kernel/sub/`)**:
@@ -208,7 +210,7 @@ make run-gui
| **Networking & Routing** | `ifconfig`, `ping`, `traceroute`, `arp`, `dhclient`, `nslookup`, `dnscache`, `netstat`, `iptables`, `rfilter`, `httpd`, `sshd`, `curl`, `wget`, `ssh` |
| **Hardware & Storage** | `lspci`, `lsdev`, `lsblk`, `fdisk`, `hdparm`, `sensors`, `speaker`, `beep`, `mouse`, `alsamixer`, `tts`, `virtinfo` |
| **Security & Cryptography** | `su`, `passwd`, `useradd`, `certcheck`, `capsh`, `ipcs`, `chacha20`, `sha3sum`, `base64`, `aead`, `cryptobench` |
| **SUB Language & System** | `subinfo`, `subpower`, `subbench`, `subquote`, `pstree`, `kill`, `shm`, `readelf`, `buddyinfo`, `systemctl`, `service`, `crontab`, `logger`, `logread`, `watchdog`, `rustinfo`, `cppinfo`, `cpptest` |
| **SUB Language & System** | `subinfo`, `subpower`, `subbench`, `subquote`, `pstree`, `kill`, `shm`, `readelf`, `buddyinfo`, `systemctl`, `service`, `crontab`, `logger`, `logread`, `watchdog`, `rustinfo`, `cppinfo`, `cpptest`, `cppdevs`, `cppbench` |
| **Entertainment & Games** | `snake`, `matrix`, `calc` |
| **Kernel & Tracing** | `lsmod`, `insmod`, `rmmod`, `slabinfo`, `trace`, `unshare`, `io_uring_test` |
| **Diagnostics & Metrics**| `neofetch`, `uname`, `free`, `uptime`, `top`, `htop`, `ps`, `dmesg`, `vmstat`, `iostat` |