MCPcopy Index your code
hub / github.com/Luminarys/synapse

github.com/Luminarys/synapse @1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0 ↗ · + Follow
1,000 symbols 2,911 edges 73 files 42 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

synapse

Build Status

Synapse is a flexible and fast BitTorrent daemon.

It currently supports most systems which implement epoll or kqueue, with a focus on 64-bit linux servers.

About

  • Event based RPC using websockets
  • HTTP downloads and TLS for easy server usage
  • Can be used via web client with minimal setup - see receptor
  • See this wiki page for an overview of stability

Installation

Package

A list of packages can be found on this wiki page.

Compiling

Install dependencies:

  • rustc >= 1.30.0
  • cargo >= 0.18
  • OpenSSL >= 1.0.2
  • pkg-config
  • gcc | clang

Synapse and sycli can be installed with:

cargo build --release --all
cargo install
cargo install --path ./sycli/

If you'd just like to install sycli:

cargo build --release -p sycli
cargo install --path ./sycli/

Configuration

Synapse expects its configuration file to be present at $XDG_CONFIG_DIR/synapse.toml, or ~/.config/synapse.toml. If it is not present or invalid, a default configuration will be used. These defaults are given in example_config.toml.

Sycli can be configured in a similar manner, using sycli.toml.

Development

Please see this issue for details on development status. If you're interested in developing a client for synapse, see doc/RPC for the current RPC spec. if you'd like to contribute to synapse, see doc/HACKING.

Extension points exported contracts — how you extend this code

Queryable (Interface)
(no doc) [10 implementers]
rpc/src/criterion.rs
Job (Interface)
(no doc) [5 implementers]
src/control/job.rs
CIO (Interface)
Control IO trait used as an abstraction boundary between the actual logic of the torrent client and the IO that needs to [2 …
src/control/cio.rs
CJob (Interface)
(no doc) [3 implementers]
src/control/mod.rs

Core symbols most depended-on inside this repo

unwrap
called by 270
src/torrent/peer/reader.rs
clone
called by 153
src/torrent/peer/message.rs
len
called by 122
src/torrent/bitfield.rs
iter
called by 85
src/torrent/bitfield.rs
default
called by 68
sycli/src/config.rs
get
called by 57
src/disk/cache.rs
msg_rpc
called by 38
src/control/cio.rs
is_err
called by 35
src/tracker/dht/proto.rs

Shape

Method 613
Function 186
Class 137
Enum 60
Interface 4

Languages

Rust99%
C1%

Modules by API surface

src/torrent/mod.rs90 symbols
src/tracker/dht/rt.rs47 symbols
src/torrent/peer/mod.rs43 symbols
src/control/mod.rs37 symbols
sycli/src/cmd.rs34 symbols
bencode/src/lib.rs33 symbols
src/config.rs30 symbols
rpc/src/resource.rs30 symbols
src/torrent/picker/mod.rs27 symbols
src/tracker/mod.rs26 symbols
src/torrent/info.rs25 symbols
src/torrent/bitfield.rs25 symbols

For agents

$ claude mcp add synapse \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact