[package]
name = "segsource"
version = "0.2.0"
edition = "2018"
license = "MIT"
description = "A library to make reading data of any type quicker and easier."
homepage = "https://github.com/russells-crockpot/segsource"
repository = "https://github.com/russells-crockpot/segsource"
readme = "../README.md"
documentation = "https://docs.rs/segsource/"
keywords = ["data", "binary", "memory-mapped", "bytes", "io"]
categories = ["no-std", "parsing", "data-structures", "filesystem"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
bytes = { version = "1", optional = true}
tokio = { version = "1", optional = true, features = ["fs", "io-util", "rt"]}
async-trait = { version = "0.1", optional = true }
pin-project-lite = { version = "0.2", optional = true }
futures-core = { version = "0.3", optional = true }
snafu = { version = "0.6", default-features = false }

[dependencies.fs3]
version = "0.5"
optional = true

[dependencies.memmap2]
version = "0.3"
optional = true

[dependencies.segsource-derive]
path = "../derive"
version = "0.2.0"
optional = true

[features]
default = ["derive", "std"]
with_bytes = ["bytes", "std"]
derive = ["segsource-derive"]
memmap = [ "fs3", "memmap2", "std"]
async = ["tokio", "async-trait", "pin-project-lite", "futures-core", "std"]
std = ["snafu/std"]

[dev-dependencies]
color-backtrace = "0.5"
ctor = "0.1"
