sokr 0.1.1

SOKR core — immutable C ABI surface for substrate plugins
Documentation
  • Coverage
  • 100%
    79 out of 79 items documented0 out of 22 items with examples
  • Size
  • Source code size: 107.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.77 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m Average build duration of successful builds.
  • all releases: 47s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • sokr-rs/sokr
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SHA888

SOKR — Sovereign Open Kernel Runtime

Immutable sovereign core. Everything else a plugin.

Early design phase. No API is stable. No runnable code yet.

Crates.io CI License


What is SOKR?

SOKR is a sovereign compute runtime written in Rust where the core is immutable and everything else is a plugin: IR representations, substrate backends, language bindings, and dispatch policy.

The core exposes exactly three operations across a stable C ABI surface:

Operation Question
Capability Can this substrate fulfill this computation?
Dispatch Fulfill it.
Completion Signal when fulfilled.

No assumption is made about memory model, parallelism, execution time, or computation representation. Any substrate that can answer three questions is a valid SOKR backend — including substrates that do not yet exist.


Philosophy

The algorithm is the permanent asset. The substrate is a runtime decision.

SOKR imposes no conditions on the algorithm, the substrate, or the user. No vendor can revoke it. No export restriction can strand it. No hardware generation can obsolete it.


Architecture

User code (any language)
        ↓
IR Plugin          ← swappable: SOKR-native, SPIR-V, OpenQASM, or future
        ↓
SOKR Core          ← immutable, no_std, C ABI  ← this repo
  Capability → Dispatch → Completion
        ↓
Substrate Plugin   ← swappable: GPU, CPU, QPU, Neuromorphic, Photonic, or future
        ↓
Hardware

This repo is the core only. Reference plugins live in sokr-rs/sokr-plugins. Third-party plugins need only depend on sokr and implement the SokrSubstratePlugin vtable. No permission required from anyone.


How SOKR Differs

Every existing approach solves part of the problem:

Project Language no_std C ABI Plugin QPU/Neuro/Photonic Sovereign
CUDA C/C++ ❌ GPU only ❌ NVIDIA
CubeCL Rust ⚠️ partial ❌ GPU only
wgpu Rust ⚠️ partial ❌ GPU only
CUDA-Q C++/Python ✅ QPU ❌ NVIDIA
NIR Python ✅ Neuromorphic
hetGPU Research ❌ GPU only
SOKR Rust

SOKR is the only runtime that satisfies all four simultaneously: a sovereign, no_std Rust core with a stable C ABI plugin contract that makes no assumption about the substrate model.


Repository Structure

sokr/                    ← this repo (sokr-rs/sokr)
├── src/
│   ├── lib.rs           ← crate root, no_std
│   ├── types.rs         ← C ABI struct and enum definitions
│   ├── registry.rs      ← plugin registry
│   └── ffi.rs           ← #[no_mangle] extern "C" exports
├── docs/
│   ├── rfc/             ← RFC documents
│   └── references.md    ← curated references
├── Cargo.toml           ← single crate, no workspace
└── cbindgen.toml        ← C header generation config

Plugins: github.com/sokr-rs/sokr-plugins


Status

v0.1.x — foundation phase. Core ABI defined, validation implemented. FFI stubs return NoCapableSubstrate pending Phase 1.3 substrate routing.

See TODO.md for the roadmap and ARCHITECTURE.md for the design.


License

Licensed under either of

at your discretion.

Any contribution intentionally submitted for inclusion in this work shall be dual licensed as above, without any additional terms or conditions.


Copyright 2026 The SOKR Project