Skip to content

Commit 0c0e735

Browse files
committed
chore: add Cargo features
1 parent f3b36f3 commit 0c0e735

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,16 @@ repository.workspace = true
2525
rust-version.workspace = true
2626

2727
[dependencies]
28-
nginx-sys = { path = "nginx-sys", version = "0.5.0"}
28+
nginx-sys = { path = "nginx-sys", default-features=false, version = "0.5.0"}
2929

3030
[features]
31-
default = ["vendored"]
31+
default = ["vendored","std"]
32+
# Enables the components using memory allocation.
33+
# If no `std` flag, `alloc` crate is internally used instead. This flag is mainly for `no_std` build.
34+
alloc = []
35+
# Enables the components using `std` crate.
36+
# Currently the only difference to `alloc` flag is `std::error::Error` implementation.
37+
std = ["alloc"]
3238
# Build our own copy of the NGINX by default.
3339
# This could be disabled with `--no-default-features` to minimize the dependency tree
3440
# when building against an existing copy of the NGINX with the NGX_OBJS variable.

examples/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ rust-version.workspace = true
1111
build = "../build.rs"
1212

1313
[dependencies]
14-
nginx-sys = { path = "../nginx-sys/", default-features = false }
15-
ngx = { path = "../", default-features = false }
14+
ngx = { path = "../", default-features = false, features = ["std"] }
1615

1716
[dev-dependencies]
1817
aws-sign-v4 = "0.3.0"

0 commit comments

Comments
 (0)