Expand description
§Pepita: Sovereign AI Distributed Computing Primitives
Pepita provides minimal kernel interfaces and distributed computing primitives
for running Sovereign AI workloads. It combines low-level kernel interfaces
(ublk, io_uring, blk-mq) with high-level distributed execution
(scheduler, executor, pool).
§Design Principles (Iron Lotus Framework)
- First-Principles Rust: Zero external dependencies in kernel mode
- Pure Rust Sovereignty: 100% auditable, zero C/C++ dependencies
- Work-Stealing Scheduler: Blumofe-Leiserson algorithm [1]
- Toyota Way Quality: Jidoka, Poka-yoke, Genchi Genbutsu
- Certeza Testing: 95% coverage, 80% mutation score
§Features
std(default): Standard library support for testing and distributed modekernel: True#![no_std]mode for kernel integration
§Example (Kernel Interfaces)
use pepita::ublk::{UblkCtrlCmd, UblkIoDesc, UblkIoCmd};
use pepita::io_uring::{IoUringSqe, IoUringCqe};
// Verify ABI compatibility with Linux kernel
assert_eq!(core::mem::size_of::<UblkCtrlCmd>(), 32);
assert_eq!(core::mem::size_of::<UblkIoDesc>(), 24);
assert_eq!(core::mem::size_of::<IoUringSqe>(), 64);§Example (Distributed Computing)
ⓘ
use pepita::pool::Pool;
use pepita::task::Task;
use pepita::executor::Backend;
// Create execution pool
let pool = Pool::builder()
.cpu_workers(4)
.build()?;
// Submit task
let task = Task::binary("./worker")
.args(vec!["--input", "data.bin"])
.backend(Backend::Cpu)
.build();
let result = pool.submit(task)?;§References
[1] Blumofe & Leiserson (1999). “Scheduling Multithreaded Computations by Work Stealing.” Journal of the ACM.
Re-exports§
pub use blk_mq::BlockOps;pub use blk_mq::Request;pub use blk_mq::RequestOp;pub use blk_mq::TagSetConfig;pub use error::KernelError;pub use error::Result;pub use io_uring::IoUringCqe;pub use io_uring::IoUringSqe;pub use io_uring::IORING_OP_URING_CMD;pub use memory::DmaBuffer;pub use memory::DmaDirection;pub use memory::PageAllocator;pub use memory::Pfn;pub use memory::PhysAddr;pub use memory::VirtAddr;pub use ublk::UblkCtrlCmd;pub use ublk::UblkIoCmd;pub use ublk::UblkIoDesc;pub use ublk::UBLK_F_CMD_IOCTL_ENCODE;pub use ublk::UBLK_F_SUPPORT_ZERO_COPY;pub use ublk::UBLK_F_USER_COPY;pub use ublk::UBLK_U_CMD_ADD_DEV;pub use ublk::UBLK_U_CMD_DEL_DEV;pub use ublk::UBLK_U_CMD_GET_PARAMS;pub use ublk::UBLK_U_CMD_SET_PARAMS;pub use ublk::UBLK_U_CMD_START_DEV;pub use ublk::UBLK_U_CMD_STOP_DEV;pub use ublk::UBLK_U_IO_COMMIT_AND_FETCH_REQ;pub use ublk::UBLK_U_IO_FETCH_REQ;
Modules§
- blk_mq
- Block multi-queue (blk-mq) interface.
- constants
- Kernel constants
- error
- Error types for Pepita kernel interfaces.
- executor
std - Executor backends for task execution.
- fault
std - Fault tolerance mechanisms for distributed execution.
- gpu
std - GPU: Compute Shader Execution
- io_
uring - io_uring kernel interface.
- memory
- Memory management types.
- pool
std - High-level execution pool for distributed task execution.
- scheduler
std - Work-stealing scheduler implementing the Blumofe-Leiserson algorithm.
- simd
std - SIMD: Vectorized Operations
- task
std - Task types for distributed execution.
- transport
std - Message transport for distributed task execution.
- ublk
- ublk (Userspace Block Device) kernel interface.
- virtio
std - Virtio: Virtual I/O Devices
- vmm
std - VMM: Lightweight Virtual Machine Monitor
- zram
std - zram: Compressed RAM Block Device