MCPcopy Index your code
hub / github.com/drmingdrmer/one-file-raft

github.com/drmingdrmer/one-file-raft @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
43 symbols 104 edges 4 files 1 documented · 2% updated 2y ago★ 133
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

one-file-raft

This is a concise, demonstrative implementation of the Raft consensus algorithm contained within a single Rust file, approximately 300 lines in length.

The primary objective is to provide an educational demo that shows the core principles of a distributed consensus protocol, free from the complexities of application-specific business logic, edge case management, and error handling.

The implementation focuses on the fundamental aspects of Raft, such as leader election, log replication and log commit, while omitting advanced features like log compaction and log purging.

./loc.sh
     300

For a production use of Raft, refer to Openraft

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 19
Class 13
Function 9
Enum 1
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs32 symbols
src/tests.rs7 symbols
src/display.rs4 symbols

For agents

$ claude mcp add one-file-raft \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page