[package] name = "ubench" version = "0.0.0-alpha0" # remember to bump in `lib.rs`! edition = "2021" rust-version = "1.62.0" license = "MIT" description = "stopgap rust benchmarking solution for microcontrollers" # TODO: keywords, categories exclude = ["flake.*", ".envrc"] repository = "https://github.com/rrbutani/ubench/" [dependencies] owo-colors = "3.4" unicode-width = { version = "0.1", optional = true } # For better aligned output # For `Metric` impls: cortex-m = { version = "0.7", optional = true } riscv = { version = "0.8", optional = true } embedded-time = { version = "0.12", optional = true } # For `Reporter` impls: embedded-hal = { version = "0.2", optional = true } nb = { version = "1", optional = true } serde = { version = "1", default-features = false, features = ["derive"], optional = true } [features] default = ["embedded-hal", "json"] all = ["std", "metrics", "reporters"] std = ["serde?/std", "owo-colors/supports-colors", "unicode-width"] # Gates both `Metric` and `Reporter` impls unicode-width = ["dep:unicode-width"] # For `Metric` impls: cortex-m = ["dep:cortex-m"] riscv = ["dep:riscv"] embedded-time = ["dep:embedded-time"] # generic; `embedded-time::Clock` based metrics = ["cortex-m", "riscv", "embedded-time"] # For `Reporter` impls: embedded-hal = ["dep:embedded-hal", "dep:nb"] json = ["dep:serde"] reporters = ["embedded-hal", "json"] [dev-dependencies] libm = "0.2" [package.metadata.docs.rs] targets = [""] rustdoc-args = ["--cfg", "docs"] all-features = true default-target = "" # TESTS: all-features, no features (for no_std/embedded) # run `bench` in the two example crates too # fmt: all three crates