MCPcopy Index your code
hub / github.com/ceramicnetwork/rust-ceramic

github.com/ceramicnetwork/rust-ceramic @v0.58.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.58.0 ↗ · + Follow
3,905 symbols 13,595 edges 422 files 1,125 documented · 29%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Rust Ceramic

Implementation of the Ceramic protocol in Rust.

Current status is that the ceramic-one binary only mimics the Kubo RPC API and relies on https://github.com/ceramicnetwork/js-ceramic for the remaining logic.

Installation

The following section covers several ways one can install Rust-Ceramic contingent on the recieving environment:

MacOS

Install from Homebrew:

brew install ceramicnetwork/tap/ceramic-one

Linux - Debian-based distributions

Install a the latest release using dpkg:

# get deb.tar.gz
curl -LO https://github.com/ceramicnetwork/rust-ceramic/releases/latest/download/ceramic-one_x86_64-unknown-linux-gnu.tar.gz
# untar the Debian software package file
tar zxvf ceramic-one_x86_64-unknown-linux-gnu.tar.gz
# install with dpkg - package manager for Debian
dpkg -i ceramic-one.deb

Linux - from Source

# Install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install build tools
apt-get install -y build-essential pkg-config openssl libssl-dev unzip
# Update environment
source "$HOME/.cargo/env"
# Install protobuf
PROTOC_VERSION=3.20.1
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip
curl --retry 3 --retry-max-time 90 -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP \
    && unzip -o $PROTOC_ZIP -d /usr/local bin/protoc \
    && unzip -o $PROTOC_ZIP -d /usr/local 'include/*' \
    && rm -f $PROTOC_ZIP
# Checkout rust-ceramic repo
git clone https://github.com/ceramicnetwork/rust-ceramic
# Enter repo and build
cd rust-ceramic
make build
cp ./target/release/ceramic-one /usr/local/bin/ceramic-one

Docker

Start rust-ceramic using the host network:

docker run --network=host \
  public.ecr.aws/r5b3e0r5/3box/ceramic-one:latest

Docker-Compose

  1. Create a testing directory, and enter it:
mkdir ceramic-recon
cd ceramic-recon
  1. Save the following docker-compose.yaml there:
version: '3.8'

services:
  ceramic-one:
    image: public.ecr.aws/r5b3e0r5/3box/ceramic-one:latest
    network_mode: "host"
    volumes:
      - ceramic-one-data:/root/.ceramic-one
volumes:
  ceramic-one-data:
    driver: local
  1. Run docker-compose up -d

Usage

Running the ceramic-one binary is simply passing the daemon cli option.

# if necessary, include the path/to/the/binary e.g. /usr/local/bin/ceramic-one or ./target/release/ceramic-one
$ ceramic-one daemon

# There are many flags for the daemon CLI that can be passed directly or set as environment variables.
# See `DaemonOpts` in one/src/lib.rs for the complete list or pass the -h flag
$ ceramic-one daemon -h

# A few common options are overriding the log level:
$ RUST_LOG=warn,ceramic_one=info,ceramic_service=debug ceramic-one daemon
# Or modifying the network
$ ceramic-one daemon --network testnet-clay
$ ceramic-one daemon --network local --local-network-id 0
# Or changing where directory where all data is stored. This folder SHOULD be backed up in production
# and if you change the defaults, you MUST specify it every time you start the daemon.
$ ceramic-one daemon --store-dir ./custom-store-dir

The process honors RUST_LOG env variable for controlling its logging output. For example, to enable debug logging for code from this repo but error logging for all other code use:

Self-Anchoring

Ceramic One supports self-anchoring directly to EVM-compatible blockchains (Gnosis, Ethereum, Polygon, etc.), eliminating the need for a centralized anchor service. See anchor-evm/README.md for setup instructions.

License

Fully open source and dual-licensed under MIT and Apache 2.

Extension points exported contracts — how you extend this code

Recorder (Interface)
Recorder that can record metrics about an event. [27 implementers]
metrics/src/lib.rs
BuilderState (Interface)
The state of the builder [6 implementers]
core/src/event_id.rs
TimeBuilderState (Interface)
State of the builder [5 implementers]
event/src/unvalidated/builder.rs
Handler (Interface)
(no doc) [19 implementers]
actor/src/lib.rs
Store (Interface)
(no doc) [11 implementers]
recon/src/recon.rs
TaskMerger (Interface)
Trait that is used to merge new tasks into the active and pending queues. [2 implementers]
beetle/iroh-bitswap/src/peer_task_queue/peer_task.rs
BuilderState (Interface)
The state of the builder [2 implementers]
one/src/network.rs
Verifier (Interface)
Represents the different ways to validate a CACAO [1 implementers]
validation/src/verifier/cacao_verifier.rs

Core symbols most depended-on inside this repo

new
called by 1439
p2p/src/rpc.rs
unwrap
called by 1176
pipeline/src/aggregator/result.rs
to_string
called by 479
api-server/src/models.rs
clone
called by 457
actor/src/lib.rs
expect
called by 428
pipeline/src/aggregator/result.rs
map
called by 320
core/src/range.rs
into_iter
called by 232
pipeline/src/aggregator/result.rs
push
called by 202
p2p/src/providers.rs

Shape

Method 2,100
Function 932
Class 636
Enum 165
Interface 72

Languages

Rust93%
TypeScript7%

Modules by API surface

pipeline/src/aggregator/mod.rs84 symbols
api/src/server.rs79 symbols
recon/src/recon/tests.rs67 symbols
api-server/src/lib.rs67 symbols
recon/src/recon.rs57 symbols
core/src/event_id.rs49 symbols
api-server/src/client/mod.rs47 symbols
kubo-rpc/src/http.rs44 symbols
event/src/unvalidated/builder.rs44 symbols
beetle/iroh-bitswap/src/lib.rs44 symbols
event-svc/src/event/ordering_task.rs42 symbols
beetle/iroh-bitswap/src/client/session/session_want_sender.rs41 symbols

For agents

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

⬇ download graph artifact