Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Koru Lambda Core
A minimal axiomatic system for computation based on distinction calculus. This engine implements a timeless, self-consistent computational substrate where complex distributed system properties arise from simple synthesis operations.
ð Key Features
- Axiomatic Foundation: Built on five core axioms (Identity, Nontriviality, Synthesis, Symmetry, Irreflexivity)
- Complex Behavior: Distributed consensus, deterministic state transitions, and mathematical structures arise naturally
- Deterministic & Timeless: Content-addressable structure ensures reproducibility
- High Performance: Optimized Rust implementation with batch operations
- Comprehensive Testing: Extensive test suite with falsification targets
ð Quick Start
Installation
[]
= "0.1.0"
Basic Usage (Rust)
use ;
Basic Usage (JavaScript/WASM)
import from './koru-wrapper.js';
const engine = ;
// Synthesize distinctions
const d2 = engine.;
console.log;
// Network consensus
const agent = ;
agent.;
agent.;
console.log;
Build the universal WASM artifact:
This produces a single artifact that runs on browsers, Node.js, Deno, Bun, Go, Kotlin, Swift, Python, and embedded systems.
ð§ Core Concepts
The Five Axioms
- Identity: A distinction is defined solely by its unique identifier
- Nontriviality: The system initializes with two primordial distinctions (Îâ, Îâ)
- Synthesis: Two distinctions combine deterministically to create a third
- Symmetry: Relationships are bidirectional and order-independent
- Irreflexivity: A distinction synthesized with itself yields itself
System Properties
The engine exhibits:
- Structural Coherence: Graph topology correlates with causal evolution patterns
- Mathematical Invariants: Mathematical patterns arise as deterministic structural relationships
- Distributed Consensus: BFT consensus, persistence, and fault tolerance without explicit coordination protocols
- High-Coherence Structures: Tightly integrated subgraphs with measurable clustering coefficients
ð Documentation
- Documentation Hub - All documentation
- Design Documentation - Theoretical foundation and SPoC protocol
- Testing Standards - Test philosophy and approach
- API Reference - Auto-generated API docs
ðïļ Architecture
koru-lambda-core/
âââ src/
â âââ engine.rs # Core synthesis (265 lines)
â âââ primitives.rs # Data canonicalization
â âââ wasm.rs # WASM bindings with binary marshalling
â âââ lib.rs # Public API
â âââ subsystems/
â âââ validator.rs # Consensus validation (SPoC)
â âââ compactor.rs # Structural compaction (R â U)
â âââ network.rs # Forkless P2P consensus
â âââ runtime.rs # Async P2P networking (libp2p)
â âââ parallel.rs # Multi-core processing
âââ scripts/
â âââ build_universal.sh # Universal WASM artifact builder
âââ tests/ # Comprehensive test suite
â âââ end_to_end.rs # Distributed system tests
â âââ runtime_integration.rs # Async runtime validation
â âââ integration_tests.rs # Falsification suite
â âââ parallel_integration.rs # Concurrency tests
â âââ throughput_verification.rs # Performance benchmarks
âââ benches/
âââ performance.rs # Criterion benchmarks
ðŽ Research & Testing
The project includes a comprehensive falsification test suite:
Run the test suite:
ð Performance
Benchmark the engine:
Performance Targets
Core Operations:
- 198,000 ops/s - Core synthesis throughput (19.8x target)
- 14,000,000 ops/s - Parallel synthesis with Rayon (140x target)
- 35,000 tx/s - Sustained batch validation throughput
Concurrency:
- Multi-core scaling - Auto-detects CPU cores for parallelism
- Thread-safe - DashMap enables lock-free concurrent operations
- Deterministic - Same inputs â identical outputs across all threads
- Zero data races - Validated with 100 concurrent threads
Distributed Consensus:
- 6,500 tx/s - Across 5 nodes (BFT configuration)
- 7Ξs leader election - Sub-10Ξs deterministic leader selection
- Instant finality - No probabilistic confirmation needed
Storage Efficiency:
- 3.85x compression - Via structural compaction
- O(log n) growth - Logarithmic storage with compaction
- 14ms compaction - For 10,000 node graphs
WASM (Universal Artifact):
- 1,500,000 ops/s - Core synthesis throughput
- 880,000 ops/s - Leader election (7 validators)
- 47,000 tx/s - Batch validation throughput
- Binary marshalling - Zero-copy Uint8Array returns eliminate FFI overhead
- Structural batching - Bulk operations run entirely inside WASM
ðŊ Use Cases
Research & Academia
- Study complex systems and computational foundations
- Explore axiomatic approaches to distributed consensus
- Test formal theories of deterministic computation
Distributed Systems
- Build fault-tolerant distributed databases
- Implement novel consensus mechanisms
- Create self-organizing network protocols
AI & Machine Learning
- Develop structurally-aware neural networks
- Explore topological learning algorithms
- Build explainable AI systems
ð§ Advanced Usage
Parallel Batch Processing
use ;
use Arc;
let engine = new;
let mut processor = new;
// Create transaction batches
let batch = TransactionBatch ;
// Process via LocalCausalAgent trait
let action = ParallelAction ;
let new_root = processor.synthesize_action;
println!;
Parallel Synthesis Operations
use ;
use Arc;
let engine = new;
let synthesizer = new;
// Parallelize byte canonicalization using Rayon
let data: = .map.collect;
let results = synthesizer.canonicalize_bytes_parallel;
println!;
Multi-Threaded Usage
use ;
use Arc;
use thread;
let engine = new;
let mut handles = vec!;
// Spawn multiple threads for concurrent synthesis
for thread_id in 0..10
// Collect results - all synthesis is thread-safe via DashMap
for handle in handles
Custom Data Mapping
use ;
let mut engine = new;
let data = "Hello, World!".as_bytes;
// Map arbitrary data to distinction structures
for &byte in data
ðĪ Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
ð License
This project is licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
ð Acknowledgments
- Based on distinction calculus and computational foundations research
- Inspired by work in mathematical foundations and distributed systems theory
- Built with the Rust programming language ecosystem
ð Links
Note: This is research software implementing novel distributed consensus mechanisms. While production-ready from an engineering perspective, the axiomatic approach is experimental.