LoFiRe Rust implementation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TG × ⊙ 1632e8f168 readme 1 month ago
.github ci: remove kcov 1 month ago
lofire merge 2 months ago
lofire-broker branch_sync working on the websocket 2 months ago
lofire-demo merge remote connection test 1 month ago
lofire-net branch_sync working on the websocket 2 months ago
lofire-node integration test for local connection 1 month ago
lofire-p2p rebase on 19-broker 2 months ago
lofire-store-lmdb Cargo: rkv dependency commit hash 2 months ago
.gitignore ci: add github action workflow 3 months ago
Cargo.lock fix build 1 month ago
Cargo.toml add Store trait, add HashMapStore, move LmdbStore to lofire-store-lmdb crate 2 months ago
LICENSE-APACHE2 add license 5 months ago
LICENSE-MIT add license 5 months ago
README.md readme 1 month ago
flake.lock init 5 months ago
flake.nix nix: cargo-kcov only on linux 1 month ago


LoFiRe Rust implementation



Design & specification

LoFiRe: Local-First Repositories for Asynchronous Collaboration over Community Overlay Networks

API documentation

LoFiRe Rust API Documentation


The following components are implemented so far:

  • lofire: library that allows access to the repository, branches, commits, objects, blocks, and contains a hash map backed store implementation.
  • lofire-store-lmdb: encrypted LMDB store implementation
  • lofire-net: library that provides network message types
  • lofire-broker: library that implements the broker server and client protocol with async, this allows running them via arbitrary network transports or in-process without networking
  • lofire-node: daemon that runs a websocket server and the broker protocol over it
  • lofire-demo: an application to demonstrate the usage and functionality that connects to the node and sends messages to it

For examples on using the libraries, see the test cases and the demo application. To run the demo, first run lofire-node, then lofire-demo (see below).




Build all packages:

cargo build


Test all:

cargo test --all --verbose -- --nocapture

Test a single module:

cargo test --package lofire --lib -- branch::test --nocapture


Generate documentation for all packages without their dependencies:

cargo doc --no-deps

The generated documentation can be found in target/doc/<crate-name>.


Build & run executables:

cargo run --bin lofire-node
cargo run --bin lofire-demo


Install the Nix package manager and Nix Flakes

Development shell

Get a development shell with all dependencies available:

nix develop
cargo build

Build a package

Build the default package (.#lofire-node):

nix build

Bulid a specific package:

nix build '.#lofire'


Run the default executable (.#lofire-node):

nix run

Run executables:

nix run '.#lofire-node'
nix run '.#lofire-demo'


Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly stated otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.