rust-lightning (LDK) is a performant, composable Lightning Network library where you plug in your own chain, network, and storage layers.
Overview
rust-lightning, part of the Lightning Development Kit, is a Rust implementation of the Lightning Network protocol aimed at integrators who want Lightning channels and routing without adopting a fixed full-node design. The core lightning crate is runtime-agnostic and exposes relatively low-level interfaces for protocol state, channel management, and on-chain logic.
Companion crates supply optional block sync, background processing, invoice parsing, Tokio-based P2P networking, channel persistence, and rapid gossip sync aimed at mobile clients. You may use these modules or replace them with custom chain interaction, key management, networking, and storage implementations following documented APIs.
The library is not a turnkey node by itself; sample projects such as LDK-node and LDK-sample build higher-level nodes on top. Design goals emphasize composable APIs, minimal required dependencies in the core, and suitability for embedding Lightning in existing on-chain wallets that keep their own UTXO and transaction workflows.
It implements BOLT specifications and has seen production use since 2021, with ongoing development on the upstream rust-bitcoin git mirror referenced from GitHub.
Key features
- BOLT Lightning protocol implementation
- Pluggable chain and network layers
- Channel persistence helpers
- BOLT 11 invoice crate
- Tokio network module option
- Rapid gossip sync client
- Background processor utilities
- nostd-friendly core crate
Use cases
- Custom Lightning-enabled wallets
- Mobile Lightning with custom sync
- Exchange or custodial Lightning integration
- Hardware-wallet-centric Lightning nodes
- Building on LDK-node or LDK-sample