Skip to content

Commit

Permalink
Merge pull request #18 from imperva/layer_example
Browse files Browse the repository at this point in the history
draft: cargo sort
  • Loading branch information
estk committed Nov 29, 2023
2 parents dd70b7c + 2ddb466 commit cf235f4
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 52 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v5
- uses: cargo-bins/cargo-binstall@main

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: "clippy, rustfmt"

- name: Info
run: |
cargo binstall -y --git https://github.com/estk/cargo-manifmt cargo-manifmt@2.0.0
rustc --version
cargo --version --verbose
cargo clippy --version
Expand All @@ -39,6 +42,7 @@ jobs:
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
cargo manifmt --check
cargo:
name: Build & Test
Expand Down
56 changes: 29 additions & 27 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cargo-features = ["workspace-inheritance"]

[workspace]
resolver = "2"
members = ["trace4rs", "trace4rs-config", "trace4rs-fmtorp", "examples"]
members = ["examples", "trace4rs", "trace4rs-config", "trace4rs-fmtorp"]

[workspace.package]
version = "0.5.1"
Expand All @@ -18,47 +18,44 @@ repository = "https://github.com/imperva/trace4rs"
readme = "readme.md"
categories = ["development-tools"]

[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3

[workspace.dependencies]
literally = "0.1.3"
log = "0.4.14"
once_cell = "1.8.0"
parking_lot = "0.12.0"
regex = "1.5.4"
thiserror = "1.0.29"
tracing = "0.1.0"
trace4rs = { version = "*", path = "trace4rs" }
trace4rs-config = { version = "*", path = "trace4rs-config" }
trace4rs-fmtorp = { version = "*", path = "trace4rs-fmtorp" }

time = { version = "0.3", features = ["formatting", "macros"] }
tokio = { version = "1.13.0", features = [
"rt",
"rt-multi-thread",
"macros",
"time",
"fs",
] }
tracing-subscriber = { version = "0.3", features = [
"std",
"fmt",
"time",
"local-time",
"registry",
] }
tracing-log = "0.2"
time = { version = "0.3", features = ["formatting", "macros"] }
path-absolutize = "3.0.11"
trace4rs = { version = "*", path = "trace4rs" }
trace4rs-config = { version = "*", path = "trace4rs-config" }
trace4rs-fmtorp = { version = "*", path = "trace4rs-fmtorp" }
utc-offset = "0.4.0"

camino = "1.1.2"
criterion = "0.5.0"
criterion-macro = "0.4.0"
literally = "0.1.3"
log = "0.4.14"
log4rs = "1.0.0"
once_cell = "1.8.0"
parking_lot = "0.12.0"
path-absolutize = "3.0.11"
regex = "1.5.4"
serde = "1.0.130"
serde_json = "1.0.68"
tempfile = "3.2.0"
tokio = { version = "1.13.0", features = [
"rt",
"rt-multi-thread",
"macros",
"time",
"fs",
] }
thiserror = "1.0.29"
tracing = "0.1.0"
tracing-log = "0.2"
utc-offset = "0.4.0"

[workspace.lints.clippy]
all = "warn"
Expand Down Expand Up @@ -101,6 +98,11 @@ unwrap_in_result = "warn"
unwrap_used = "warn"
verbose_file_reads = "warn"

[profile.dev]
opt-level = 1
[profile.dev.package."*"]
opt-level = 3

# Enable when stabilized
# allow_attributes = "warn"
# allow_attributes_without_reason = "warn"
Expand Down
17 changes: 9 additions & 8 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ publish = false
edition = "2021"
rust-version = "1.67"

[lints]
workspace = true

[dev-dependencies]
tracing-span-tree.git = "https://github.com/estk/tracing-span-tree"

literally.workspace = true
log.workspace = true
tracing-log.workspace = true
tempfile.workspace = true
tracing-subscriber.workspace = true
tokio.workspace = true
trace4rs.workspace = true
literally.workspace = true
tracing.workspace = true
tokio.workspace = true
tracing-span-tree = { git = "https://github.com/estk/tracing-span-tree" }
tracing-log.workspace = true
tracing-subscriber.workspace = true

[lints]
workspace = true
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ See for yourself with `cargo bench --features tracing-macros`
## Dev suggestions

- `cargo install cargo-binstall`
- `cargo install cargo-update`
- `cargo install cargo-nextest`
12 changes: 7 additions & 5 deletions trace4rs-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ repository.workspace = true
readme.workspace = true
categories.workspace = true

[lints]
workspace = true

[features]
in-order-serialization = ["serde"]

[dependencies]
schemars = { version = "0.8.3", optional = true }

serde = { workspace = true, optional = true, features = ["derive"] }

literally.workspace = true
thiserror.workspace = true
tracing.workspace = true
serde = { workspace = true, optional = true, features = ["derive"] }
schemars = { version = "0.8.3", optional = true }

[dev-dependencies]
serde_json.workspace = true

[lints]
workspace = true
6 changes: 3 additions & 3 deletions trace4rs-fmtorp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ repository.workspace = true
readme.workspace = true
categories.workspace = true

[lints]
workspace = true

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

[dependencies]
thiserror.workspace = true
tracing-subscriber.workspace = true

[lints]
workspace = true
19 changes: 10 additions & 9 deletions trace4rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,40 @@ repository.workspace = true
readme.workspace = true
categories.workspace = true

[lints]
workspace = true

[features]
tracing-macros = [] # internal, for benches
serde = ["trace4rs-config/serde"]

[dependencies]
camino.workspace = true
literally.workspace = true
log.workspace = true
once_cell.workspace = true
parking_lot.workspace = true
path-absolutize.workspace = true
regex.workspace = true
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-log.workspace = true
time.workspace = true
path-absolutize.workspace = true
trace4rs-config.workspace = true
trace4rs-fmtorp.workspace = true
tracing.workspace = true
tracing-log.workspace = true
tracing-subscriber.workspace = true
utc-offset.workspace = true
camino.workspace = true

[dev-dependencies]
trace4rs-config = { workspace = true, features = ["in-order-serialization"] }

criterion.workspace = true
criterion-macro.workspace = true
log4rs.workspace = true
serde.workspace = true
serde_json.workspace = true
tempfile.workspace = true
tokio.workspace = true
trace4rs-config = { workspace = true, features = ["in-order-serialization"] }

[lints]
workspace = true

[[bench]]
name = "trace4rs_bench"
Expand Down

0 comments on commit cf235f4

Please sign in to comment.