[package]
authors = ["Andre-Philippe Paquet <appaquet@gmail.com>"]
categories = ["database-implementations", "command-line-interface", "wasm", "web-programming"]
description = "Core of Exocore (Distributed applications framework)"
edition = "2018"
keywords = ["networking", "mobile", "webassembly", "storage", "database"]
license = "Apache-2.0"
name = "exocore-core"
repository = "https://github.com/appaquet/exocore"
version = "0.1.4"

[features]
logger = ["log4rs"]
runtime = [
  "tokio/io-util",
  "tokio/io-std",
  "tokio/net",
  "tokio/rt",
  "tokio/rt-multi-thread",
  "tokio/sync",
  "tokio/time",
  "tokio/macros",
]
tests-utils = ["runtime", "logger"]

[dependencies]
anyhow = "1.0"
bs58 = "0.4"
byteorder = "1.3"
bytes = "1.0"
chrono = "0.4"
exocore-protos = {version = "0.1.4", path = "../protos"}
futures = {version = "0.3", features = ["async-await"]}
libp2p = {version = "0.35", features = ["noise"], default-features = false}
log = "0.4"
log4rs = {version = "1.0", optional = true}
multihash = "0.13"
petname = "1.1"
rand = "0.8"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
serde_yaml = "0.8"
thiserror = "1.0"
url = "2.2"
uuid = {version = "0.8", features = ["v4", "wasm-bindgen"]}
wasm-timer = "0.2"

[target."cfg(target_arch = \"wasm32\")".dependencies]
getrandom = {version = "0.2", features = ["js"]}# see https://docs.rs/getrandom/0.2.0/getrandom/#webassembly-support
parking_lot = {version = "0.11", features = ["wasm-bindgen"]}
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = {version = "1.4", features = ["rt"], default-features = false}

[dev-dependencies]
criterion_bencher_compat = "0.3"
log4rs = "1.0"
tempfile = "3.2"

[[bench]]
harness = false
name = "capnp_frame"
