[package] name = "gearbox" version = "4.0.1-beta.3" edition = "2021" authors = ["Anders Blenstrup-Pedersen "] description = "Excessive tooling for Rust, boosting productivity and operations" readme = "README.md" categories = ["date-and-time", "asynchronous", "network-programming", "development-tools::debugging"] keywords = ["tooling"] license = "MIT" repository = "https://github.com/nebula-technologies/gearbox" resolver = "2" [package.metadata.docs.rs] # Indicate that the README should be used as the main page rustdoc-args = ["--document-private-items", "--index-page", "README.md"] [lib] crate-type = ["cdylib", "rlib"] path = "src/lib.rs" [badges] maintenance = { status = "actively-developed" } [features] ## Default - None default = ["std"] ## Full - all features available full = [] ## ## Global Cross deps ## std = [] axum = ["dep:axum"] base64 = ["dep:base64"] bs58 = ["dep:bs58"] bson = ["dep:bson"] bytes = ["dep:bytes"] derive_more = ["dep:derive_more"] didkit = ["dep:didkit"] erased_serde = ["dep:erased-serde"] flexbuffers = ["dep:flexbuffers"] futures = ["dep:futures"] gearbox_macros = ["dep:gearbox-macros"] hashbrown = ["dep:hashbrown"] hex = ["dep:hex"] hmac = ["dep:hmac"] hyper = ["dep:hyper"] hyper_util = ["dep:hyper-util"] if_addrs = ["dep:if-addrs"] json5 = ["dep:json5"] pnet = ["dep:pnet"] postcard = ["dep:postcard"] reqwest = ["dep:reqwest"] rmp_serde = ["dep:rmp-serde"] ron = ["dep:ron"] semver = ["dep:semver"] dep_serde = ["dep:serde", "serde_derive"] serde_cbor = ["dep:serde_cbor"] serde_derive = ["dep:serde_derive"] serde_json = ["dep:serde_json"] serde_lexpr = ["dep:serde-lexpr"] serde_pickle = ["dep:serde-pickle"] serde_qs = ["dep:serde_qs"] serde_xml_rs = ["dep:serde-xml-rs"] serde_yaml = ["dep:serde_yaml"] sha2 = ["dep:sha2"] sys_info = ["dep:sys-info"] spin = ["dep:spin"] tokio = ["dep:tokio"] tracing = ["dep:tracing"] uniffi = ["dep:uniffi"] uniffi_macros = ["dep:uniffi_macros"] tracing_subscriber = ["dep:tracing-subscriber"] ## ## Feature Extensions ## with_serde = ["dep_serde", "serde_derive"] with_json = ["serde_json"] ## ## Main Feature Flags ## # Collections collections = ["std"] collections-all = ["collections-const-hash-map", "collections-hash-map", "collections-simple-linked-list", "collections-vec-deque"] collections-const-hash-map = ["collections", "hashbrown"] collections-hash-map = ["collections", "hashbrown"] collections-simple-linked-list = ["collections"] collections-vec-deque = ["collections"] # Common common = ["std"] common-all = ["common-try-default"] common-try-default = ["common"] common-boxed-future = ["common"] common-ips = ["common", "if_addrs"] common-process = ["common"] did = ["std"] did-all = ["did-sld"] did-sld = ["did", "dep_serde", "regex", "serde_json"] # Error Tracers error = ["std"] error-all = ["error", "error-tracer", "error-tracer-macros", "error-type-registry"] error-tracer = ["error", "erased_serde", "spin"] error-tracer-macros = ["error-tracer"] error-type-registry = ["error", "spin", "collections-hash-map"] # Log # > TODO: std and libc needs removal from the implementation log = ["tracing", "common-process", "net-hostname", "tracing_subscriber", "std", "libc"] # > TODO: log has a bad dep of log-tracing-syslog this needs to be moved out and or changed log-tracing = ["log", "collections-hash-map", "hashbrown", "time", "log-tracing-syslog", "tracing-subscriber/std", "tracing-subscriber/fmt", "dep_serde", "serde_json", "serde_derive"] log-tracing-all = ["log-tracing", "log-tracing-deeplog", "log-tracing-bunyan", "log-tracing-syslog", "log-tracing-macros"] log-tracing-bunyan = ["log-tracing", "with_serde"] log-tracing-deeplog = ["log-tracing", "pnet", "dep:tokio", "futures", "toml", "sync-rw-arc", "sys_info", "with_serde", "serde_json"] log-tracing-syslog = ["log-tracing"] log-tracing-macros = ["log", "log-tracing", "log-tracing-macros-common"] log-tracing-macros-syslog = ["log-tracing-macros"] log-tracing-macros-common = ["log-tracing-macros"] # Net net = ["std"] net-hostname = ["net", "libc"] net-http = ["net"] net-signature = ["net", "base64", "bs58", "hashbrown", "dep_serde", "hmac", "sha2", "time"] net-http-dyno-request = ["net-http"] net-http-request = ["net-http", "url", "serde_json", "reqwest", "dep_serde", "error-tracer", "rails-ext", "hashbrown", "serde_derive", "spin", "bytes", "common-boxed-future"] net-http-request-chaining = ["net-http", "dep_serde", "error-tracer", "spin", "template", "net-http-request", "regex", "time", "collections-hash-map"] # Path - common paths in systems path = ["std"] path-dirs = ["path", "dep:dirs"] # Rails - Railway oriented Programming extenstions rails = ["std"] rails-ext = ["rails", "error-tracer", "spin"] rails-tracing = ["rails"] # Services - Builders and more service = ["std"] service-discovery = ["service", "serde_json", "tokio", "dep_serde", "serde_derive", "time", "common-ips", "log-tracing-all"] service-framework-axum = ["service", "service-discovery", "serde_json", "axum", "tokio", "dep_serde", "serde_derive", "time", "log-tracing-all", "common-ips", "sync-rw-arc", "num_cpus", "hyper", "hyper_util", "tower-http"] # Storage storage = ["std", "common-try-default", "error-tracer", "dep_serde", "rails-ext"] storage-all = ["storage", "storage-web", "storage-io"] storage-web = ["storage", "dep_serde", "serde_json"] storage-io = ["storage", "dep_serde", "storage-yaml-ext", "storage-json-ext", "std", "path-dirs", "spin", "libc", "rails-ext", "rails-tracing", "tracing", "log-tracing-macros"] storage-yaml-ext = ["storage", "serde_yaml"] storage-json-ext = ["storage", "serde_json"] # Sync/Async support blocks sync = ["std"] sync-rw-arc = ["sync"] # Template Engine template = ["std", "hashbrown", "spin", "regex", "time", "error-tracer"] # Time time = ["std", "spin", "rails-ext", "error-tracer"] time-serde = ["time", "dep_serde"] ##################### [dependencies] derive_more = { version = "0.99.18", optional = true } serde_json = { version = "1", optional = true } serde_yaml = { version = "0.9.34", optional = true } serde = { version = "1", optional = true } tracing = { version = "0.1.40", default-features = false, features = ["log", "attributes"], optional = true } libc = { version = "0.2.159", optional = true } tracing-subscriber = { version = "0.3.18", default-features = false, features = ["smallvec", "sharded-slab", "thread_local", "nu-ansi-term"], optional = true } tracing-log = { version = "0.2.0", default-features = false, features = ["log-tracer", "interest-cache"], optional = true } num-traits = { version = "0.2.19", optional = true } spin = { version = "0.9.8", optional = true } hashbrown = { version = "0.14.5", features = ["serde"], optional = true } url = { version = "2.5.2", optional = true } serde_derive = { version = "1.0.210", optional = true } ## These are mainly used for "dirs" feature ## dirs = { version = "5.0.1", optional = true } ## These are mainly used for "http-request" feature ## reqwest = { version = "0.12.7", default-features = false, features = ["rustls-tls"], optional = true } ## These are mainly used for "net-signature" feature ## hex = { version = "0.4.3", optional = true } base64 = { version = "0.22.1", optional = true } hmac = { version = "0.13.0-pre.4", optional = true } sha2 = { version = "0.11.0-pre.4", optional = true } bs58 = { version = "0.5.1", optional = true } ## These are mainly used for "DID" feature didkit = { version = "0.6.0", optional = true } ## These are mainly used for "web" feature web-sys = { version = "0.3.70", features = [], optional = true } js-sys = { version = "0.3.70", optional = true } uniffi_macros = { version = "0.28", optional = true } uniffi = { version = "0.28", features = ["build", "cli"], optional = true } ## TODO Might not be needed here bytes = { version = "1.7.2", optional = true } semver = { version = "1.0.23", optional = true } ## Serde Dynamic implementation apache-avro = { version = "0.16.0", features = ["snappy"], optional = true } bson = { version = "2.13.0", optional = true } flexbuffers = { version = "2.0.0", optional = true } json5 = { version = "0.4.1", optional = true } postcard = { version = "1.0.10", features = ["alloc"], optional = true } rmp-serde = { version = "1.3.0", optional = true } ron = { version = "0.9.0-alpha.0", optional = true } serde-lexpr = { version = "0.1.3", optional = true } serde-pickle = { version = "1.1.1", optional = true } serde-xml-rs = { version = "0.6.0", optional = true } serde_cbor = { version = "0.11.2", optional = true } serde_qs = { version = "0.13.0", optional = true } toml = { version = "0.8.19", optional = true } futures = { version = "0.3.30", optional = true } regex = { version = "1.10.6", optional = true } erased-serde = { version = "0.4.5", optional = true } ## Exposing the common gearbox macros gearbox-macros = { version = "0.0.1", optional = true } clap = { version = "4.5", features = ["derive"], optional = true } chrono = { version = "0.4", optional = true } lazy_static = { version = "1.5", optional = true } ## Used for: ## - log::tracing (discover_log) pnet = { version = "0.35", optional = true } sys-info = { version = "0.9", optional = true } nix = { version = "0.29", features = [], optional = true } if-addrs = { version = "0.13", optional = true } ## Frameworks ## ## Axum ## axum = { version = "0.7", optional = true } tower-http = { version = "0.5", features = ["timeout", "trace"], optional = true } tower-service = { version = "0.3", optional = true } hyper = { version = "1.4", features = ["full"], optional = true } hyper-util = { version = "0.1", features = ["full"], optional = true } num_cpus = { version = "1.16", optional = true } ## These are mainly used for "Wasm32" implementations [target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio] optional = true version = "1" features = ["full"] [target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen] optional = true version = "0.2.93" [target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen-futures] optional = true version = "0.4.43" [dev-dependencies] hyper = { version = "1", features = ["full"] } tokio = { version = "1", features = ["full"] } http-body-util = "0.1" hyper-util = { version = "0.1", features = ["full"] } wasm-bindgen-test = "0.3.43"