Skip to content

Commit 4e8120a

Browse files
committed
fix: minimize deps for building examples with nginx buildsystem
1 parent d610c0b commit 4e8120a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ keywords = ["nginx", "module", "sys"]
2222
nginx-sys = { path = "nginx-sys", version = "0.5.0"}
2323

2424
[features]
25+
default = ["vendored"]
2526
# Build our own copy of the NGINX by default.
2627
# This could be disabled with `--no-default-features` to minimize the dependency tree
2728
# when building against an existing copy of the NGINX with the NGX_OBJS variable.
28-
default = ["nginx-sys/vendored"]
29+
vendored = ["nginx-sys/vendored"]
2930

3031
[badges]
3132
maintenance = { status = "experimental" }

examples/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ edition = "2021"
66
license = "Apache-2.0"
77

88
[dev-dependencies]
9-
ngx = { path = "../" }
9+
ngx = { path = "../", default-features = false }
1010
aws-sign-v4 = "0.3.0"
1111
chrono = "0.4.23"
1212
http = "1.1.0"
1313
libc = "0.2.140"
14+
tokio = { version = "1.33.0", features = ["full"] }
1415

1516
[[example]]
1617
name = "curl"
@@ -39,10 +40,9 @@ path = "async.rs"
3940
crate-type = ["cdylib"]
4041

4142
[dependencies]
42-
tokio = { version = "1.33.0", features = ["full"] }
4343

4444
[features]
45-
default = ["export-modules"]
45+
default = ["export-modules", "ngx/vendored"]
4646
# Generate `ngx_modules` table with module exports
4747
# The exports table is required for building loadable modules with --crate-type cdylib
4848
# outside of the NGINX buildsystem. However, cargo currently does not detect

0 commit comments

Comments
 (0)