Skip to content

Document feature flags #1415

@Lorak-mmk

Description

@Lorak-mmk

Our crates have a lot of feature flags.
scylla:

[features]
default = []
openssl-010 = ["dep:tokio-openssl", "dep:openssl"]
rustls-023 = ["dep:tokio-rustls", "dep:rustls"]
unstable-cloud = [
"scylla-cql/serde",
"dep:serde_yaml",
"dep:serde",
"dep:url",
"dep:base64",
]
secrecy-08 = ["scylla-cql/secrecy-08"]
chrono-04 = ["scylla-cql/chrono-04"]
time-03 = ["scylla-cql/time-03"]
num-bigint-03 = ["scylla-cql/num-bigint-03"]
num-bigint-04 = ["scylla-cql/num-bigint-04"]
bigdecimal-04 = ["scylla-cql/bigdecimal-04"]
full-serialization = [
"chrono-04",
"time-03",
"secrecy-08",
"num-bigint-03",
"num-bigint-04",
"bigdecimal-04",
]
metrics = ["dep:histogram"]
unstable-testing = []

scylla-cql:
[features]
secrecy-08 = ["dep:secrecy-08"]
time-03 = ["dep:time-03"]
chrono-04 = []
num-bigint-03 = ["dep:num-bigint-03"]
num-bigint-04 = ["dep:num-bigint-04"]
bigdecimal-04 = ["dep:bigdecimal-04"]
full-serialization = [
"chrono-04",
"time-03",
"secrecy-08",
"num-bigint-03",
"num-bigint-04",
"bigdecimal-04",
]

They really lack any documentation.
docs.rs has this page: https://docs.rs/crate/scylla/latest/features , but as expected there is very little information there.
They recommend a few places to write feature flags docs in: readme, main docs page, Cargo.toml.
We should choose one and write them.

Personally I think Cargo.toml is the best place (+ linking to it from readme / main docs page).
Why? It pretty much eliminates risk of docs getting out of sync with definitions. It also allows us to keep docs close to the thing they document.

Metadata

Metadata

Assignees

Labels

area/documentationImprovements or additions to documentation

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions