2024-01-21 00:04:09 +00:00
|
|
|
[package]
|
2024-01-22 01:56:34 +00:00
|
|
|
name = "cuprate-helper"
|
2024-01-21 00:04:09 +00:00
|
|
|
version = "0.1.0"
|
|
|
|
edition = "2021"
|
2024-01-22 01:56:34 +00:00
|
|
|
description = "Helper functions used around Cuprate."
|
|
|
|
license = "MIT"
|
|
|
|
authors = ["hinto-janai <hinto.janai@protonmail.com>", "Boog900"]
|
|
|
|
repository = "https://github.com/Cuprate/cuprate/tree/main/consensus"
|
|
|
|
|
2024-01-21 00:04:09 +00:00
|
|
|
|
|
|
|
[features]
|
|
|
|
# All features on by default.
|
|
|
|
default = ["std", "atomic", "asynch", "num", "time", "thread"]
|
|
|
|
std = []
|
|
|
|
atomic = []
|
|
|
|
asynch = ["dep:futures", "dep:rayon"]
|
|
|
|
num = []
|
|
|
|
time = ["dep:chrono", "std"]
|
|
|
|
thread = ["std", "dep:target_os_lib"]
|
|
|
|
|
|
|
|
[dependencies]
|
2024-01-21 14:46:03 +00:00
|
|
|
chrono = { workspace = true, optional = true, features = ["std", "clock"] }
|
|
|
|
futures = { workspace = true, optional = true, features = ["std"] }
|
2024-01-21 00:04:09 +00:00
|
|
|
rayon = { workspace = true, optional = true }
|
|
|
|
|
|
|
|
# This is kinda a stupid work around.
|
|
|
|
# [thread] needs to activate one of these libs (windows|libc)
|
|
|
|
# although it depends on what target we're building for.
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
|
|
target_os_lib = { package = "windows", version = ">=0.51", features = ["Win32_System_Threading", "Win32_Foundation"], optional = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
|
|
target_os_lib = { package = "libc", version = "0.2.151", optional = true }
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
tokio = { workspace = true }
|