Skip to content

Commit

Permalink
refactor: reduce dependencies (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Feb 4, 2025
1 parent b7e9557 commit ba5a004
Show file tree
Hide file tree
Showing 17 changed files with 99 additions and 905 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ jobs:
- name: Run unit tests
run: cargo x test --no-capture
shell: bash
- name: Run examples
shell: bash
run: |
cargo run --features="driver" --example time_driver
cargo run --features="tokio,logging" --example schedule_at_fixed_rate
cargo run --features="tokio,logging" --example schedule_by_notify
cargo run --features="tokio,logging" --example schedule_with_arbitrary_delay
cargo run --features="tokio,logging" --example schedule_with_fixed_delay
env:
RUST_LOG: DEBUG

required:
name: Required
Expand Down
54 changes: 2 additions & 52 deletions fastimer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,63 +30,13 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
driver = ["dep:atomic-waker", "dep:crossbeam-queue", "dep:parking"]
logging = ["dep:log"]
tokio = ["tokio-time", "tokio-spawn"]
tokio-spawn = ["dep:tokio", "tokio/rt-multi-thread"]
tokio-time = ["dep:tokio", "tokio/time"]

[dependencies]
if_chain = { version = "1.0.2" }
pin-project = { version = "1.1.7" }
pin-project = { version = "1.1.9" }

atomic-waker = { version = "1.1.2", optional = true }
crossbeam-queue = { version = "0.3.11", optional = true }
# optional dependencies
log = { version = "0.4.22", features = ["kv"], optional = true }
parking = { version = "2.2.1", optional = true }
tokio = { version = "1.42.0", optional = true }

[dev-dependencies]
log = { version = "0.4.22", features = ["kv"] }
logforth = { version = "0.21.0" }
mea = { version = "0.2.0" }
tokio = { version = "1.42.0", features = ["full"] }

[lints]
workspace = true

[[example]]
doc-scrape-examples = true
name = "schedule_at_fixed_rate"
path = "examples/schedule_at_fixed_rate.rs"
required-features = ["tokio", "logging"]

[[example]]
doc-scrape-examples = true
name = "schedule_by_notify"
path = "examples/schedule_by_notify.rs"
required-features = ["tokio", "logging"]

[[example]]
doc-scrape-examples = true
name = "schedule_with_arbitrary_delay"
path = "examples/schedule_with_arbitrary_delay.rs"
required-features = ["tokio", "logging"]

[[example]]
doc-scrape-examples = true
name = "schedule_with_fixed_delay"
path = "examples/schedule_with_fixed_delay.rs"
required-features = ["tokio", "logging"]

[[example]]
doc-scrape-examples = true
name = "static_time_driver"
path = "examples/static_time_driver.rs"
required-features = ["driver"]

[[example]]
doc-scrape-examples = true
name = "time_driver"
path = "examples/time_driver.rs"
required-features = ["driver"]
53 changes: 0 additions & 53 deletions fastimer/examples/common/mod.rs

This file was deleted.

81 changes: 0 additions & 81 deletions fastimer/examples/schedule_at_fixed_rate.rs

This file was deleted.

93 changes: 0 additions & 93 deletions fastimer/examples/schedule_by_notify.rs

This file was deleted.

75 changes: 0 additions & 75 deletions fastimer/examples/schedule_with_arbitrary_delay.rs

This file was deleted.

Loading

0 comments on commit ba5a004

Please sign in to comment.