Skip to content

Commit

Permalink
Merge pull request #2093 from b-zee/feat-client-api-skeleton
Browse files Browse the repository at this point in the history
feat: client API first iteration
  • Loading branch information
b-zee authored Sep 10, 2024
2 parents e24cd76 + 3f1a4fb commit b421ef7
Show file tree
Hide file tree
Showing 32 changed files with 1,740 additions and 22 deletions.
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
resolver = "2"
members = [
"autonomi",
"sn_auditor",
"sn_build_info",
"sn_cli",
Expand Down
43 changes: 43 additions & 0 deletions autonomi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "autonomi"
version = "0.1.0"
edition = "2021"

[features]
default = []
full = ["data", "files", "fs", "registers", "transfers"]
data = ["transfers"]
files = ["transfers"]
fs = []
local = ["sn_client/local-discovery"]
registers = ["transfers"]
transfers = []

[dependencies]
bip39 = "2.0.0"
bls = { package = "blsttc", version = "8.0.1" }
bytes = { version = "1.0.1", features = ["serde"] }
libp2p = "0.53"
rand = "0.8.5"
rmp-serde = "1.1.1"
self_encryption = "~0.29.0"
serde = { version = "1.0.133", features = ["derive", "rc"] }
sn_client = { path = "../sn_client" }
sn_protocol = { version = "0.17.5", path = "../sn_protocol" }
sn_registers = { path = "../sn_registers", version = "0.3.18" }
sn_transfers = { path = "../sn_transfers", version = "0.19.0" }
thiserror = "1.0.23"
tokio = { version = "1.35.0", features = ["sync", "fs"] }
tracing = { version = "~0.1.26" }
walkdir = "2.5.0"
xor_name = "5.0.0"

[dev-dependencies]
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
25 changes: 25 additions & 0 deletions autonomi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `autonomi` - Autonomi client API

[![Crates.io](https://img.shields.io/crates/v/autonomi.svg)](https://crates.io/crates/autonomi)
[![docs.rs](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/autonomi)

Connect to and build on the Autonomi network.

## Usage

See [docs.rs/autonomi](https://docs.rs/autonomi) for usage examples.

## Running tests

Run a local network with the `local-discovery` feature:

```sh
cargo run --bin=safenode-manager --features=local-discovery -- local run --build --clean
```

Then run the tests with the `local` feature:
```sh
$ cargo test --package=autonomi --features=local
# Or with logs
$ RUST_LOG=autonomi cargo test --package=autonomi --features=local -- --nocapture
```
Loading

0 comments on commit b421ef7

Please sign in to comment.