[workspace]
resolver = "2"
members = [
    "examples/chunked_response",
    "examples/custom_extractor",
    "examples/form",
    "examples/hello_world",
    "examples/hello_world_single_thread",
    "examples/huge_requests",
    "examples/layers",
    "examples/path_parameters",
    "examples/routing_fallback",
    "examples/server_sent_events",
    "examples/state",
    "examples/static_content",
    "examples/web_sockets"
]
exclude = [
    "examples/embassy",
]

[package]
name = "picoserve"
version = "0.12.2"
authors = ["Samuel Hicks"]
edition = "2021"
rust-version = "1.75"
description = "An async no_std HTTP server suitable for bare-metal environments"
readme = "README.md"
repository = "https://github.com/sammhicks/picoserve"
license = "MIT"
keywords = ["no_std", "http", "web", "framework"]
categories = ["asynchronous", "network-programming", "web-programming::http-server"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
const-sha1 = { version = "0.3.0", default-features = false }
data-encoding = { version = "2.4.0", default-features = false }
defmt = { version = "0.3.6", optional = true }
embassy-net = { version = "0.4.0", optional = true, features = ["tcp", "proto-ipv4", "medium-ethernet"] }
embassy-time = { version = "0.3.0", optional = true }
embedded-io-async = "0.6.0"
futures-util = { version = "0.3.28", default-features = false }
heapless = { version = "0.8.0", features = ["serde"] }
lhash = { version = "1.0.1", features = ["sha1"] }
log = { version = "0.4.19", optional = true, default-features = false }
ryu = "1.0.14"
serde = { version = "1.0.171", default-features = false, features = ["derive"] }
serde-json-core = "0.6.0"
tokio = { version = "1.32.0", optional = true, features = ["io-util", "net", "time"] }

[features]
std = ["alloc"]
alloc = []

tokio = ["dep:tokio", "std", "serde/std"]
embassy = ["dep:embassy-time", "dep:embassy-net"]

defmt = ["dep:defmt", "embassy-net?/defmt", "serde-json-core/defmt"]
log = ["dep:log"]

[dev-dependencies]
embedded-io-async = { version = "0.6.0", features = ["std"] }
http-body-util = "0.1.0"
hyper = { version = "1.1.0", features = ["client", "http1"] }
tokio = { version = "1.0.0", features = ["rt", "io-util", "net", "time", "macros", "sync"] }
