594 releases (66 breaking)

0.110.4 Oct 9, 2024
0.110.1 Sep 24, 2024
0.109.0 Jul 29, 2024
0.105.2 Mar 28, 2024
0.44.11 Dec 30, 2020

#528 in Network programming


Used in 4 crates

GPL-3.0 license

1.5MB
23K SLoC

sn_client - SAFE Network Client Library

Overview

The sn_client library provides the core functionalities for interacting with the SAFE Network. It handles tasks such as connecting to the network, managing concurrency, and performing various network operations like data storage and retrieval.

Table of Contents

Installation

To include sn_client in your Rust project, add the following to your Cargo.toml:

[dependencies]
sn_client = "latest_version_here"

Usage

To use sn_client, you first need to instantiate a client. Here's a simple example:

use sn_client::Client;
let client = Client::new(signer, peers, req_response_timeout, custom_concurrency_limit).await?;

Running Tests

Prerequisites:

  • A running local network. Refer to safe_network/README.md to run a local test network.
  • SAFE_PEERS environment variable or running the tests with --feature=local-discovery:
$ cargo test --package sn_client --release --tests --features=local-discovery

Contributing

Please refer to the Contributing Guidelines from the main directory for details on how to contribute to this project.

Conventional Commits

We follow the Conventional Commits specification for commit messages. Please adhere to this standard when contributing.

License

This Safe Network repository is licensed under the General Public License (GPL), version 3 (LICENSE http://www.gnu.org/licenses/gpl-3.0.en.html).

Dependencies

~67–105MB
~2M SLoC