Documentation
SDK Overview
Lux Consensus provides native SDKs in multiple programming languages, each optimized for its ecosystem while maintaining 100% protocol compatibility.
Available SDKs
Go SDK (Production)
The reference implementation, used in production blockchain nodes.
import "github.com/luxfi/consensus/engine/core"
engine := core.NewChain(core.DefaultConfig())Status: ✅ Production Ready
Test Coverage: 74.5%
Documentation: Go SDK
C SDK (Production)
High-performance native library for embedded systems and performance-critical applications.
#include <lux_consensus.h>
lux_engine_t* engine = lux_create_engine(&config);Status: ✅ Production Ready
Tests: 33/33 passing (100%)
Documentation: C SDK
Rust SDK (Production)
Memory-safe implementation with zero-cost abstractions.
use lux_consensus::{Engine, Config};
let engine = Engine::new(Config::default())?;Status: ✅ Production Ready
Tests: 4/4 passing (100%)
Documentation: Rust SDK
Python SDK (Research)
Pythonic API for rapid prototyping and research.
from lux_consensus import Engine, Config
engine = Engine(Config())Status: 🔬 Research
Test Suite: 674 LOC
Documentation: Python SDK
C++ SDK with MLX (Development)
GPU-accelerated implementation for Apple Silicon.
#include <lux/consensus.hpp>
auto engine = lux::Engine(config);Status: 🚧 Development
Platform: Apple Silicon (M1/M2/M3)
Documentation: C++ SDK
Feature Parity
All SDKs implement the same consensus protocols:
| Feature | Go | C | Rust | Python | C++ |
|---|---|---|---|---|---|
| Chain Consensus | ✅ | ✅ | ✅ | ✅ | ✅ |
| DAG Consensus | ✅ | ✅ | ✅ | ✅ | 🚧 |
| Post-Quantum | ✅ | ✅ | ✅ | ✅ | 🚧 |
| AI Integration | ✅ | ❌ | ❌ | ✅ | 🚧 |
| Benchmarks | ✅ | ✅ | ✅ | ✅ | 🚧 |
Installation
See language-specific installation guides: