diff --git a/Cargo.toml b/Cargo.toml index 22f50559af6..b0b0b0d2ffe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -179,7 +179,7 @@ gateway = ["flate2", "http", "utils"] http = [] absolute_ratelimits = ["http"] model = ["builder", "http"] -voice-model = ["serenity-voice-model"] +voice_model = ["serenity-voice-model"] standard_framework = ["framework", "uwl", "levenshtein", "command_attr", "static_assertions"] unstable_discord_api = [] utils = ["base64"] @@ -188,7 +188,7 @@ tokio_task_builder = ["tokio/tracing"] time = [] # Enables simd accelerated parsing -simdjson = ["simd-json"] +simd_json = ["simd-json"] # Enables temporary caching in functions that retrieve data via the HTTP API. temp_cache = ["cache", "moka"] @@ -210,6 +210,10 @@ native_tls_backend = [ "bytes", ] +# TODO(next): Remove, these are deprecated aliases +simdjson = ["simd_json"] +voice-model = ["voice_model"] + [package.metadata.docs.rs] features = ["default", "collector", "unstable_discord_api", "voice", "voice-model"] rustdoc-args = ["--cfg", "docsrs"] diff --git a/README.md b/README.md index 659e0a5791a..6ca0583d6ee 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ due to latency in the network. If you turn this feature on, it is recommended to synchronise your clock with an NTP server (such as Google's). - **tokio_task_builder**: Enables tokio's `tracing` feature and uses `tokio::task::Builder` to spawn tasks with names if `RUSTFLAGS="--cfg tokio_unstable"` is set. - **unstable_discord_api**: Enables features of the Discord API that do not have a stable interface. The features might not have official documentation or are subject to change. -- **simdjson**: Enables SIMD accelerated JSON parsing and rendering for API calls, use with `RUSTFLAGS="-C target-cpu=native"` +- **simd_json**: Enables SIMD accelerated JSON parsing and rendering for API calls, use with `RUSTFLAGS="-C target-cpu=native"` - **temp_cache**: Enables temporary caching in functions that retrieve data via the HTTP API. Serenity offers two TLS-backends, `rustls_backend` by default, you need to pick diff --git a/build.rs b/build.rs index 905a137f05f..8de1a0db18f 100644 --- a/build.rs +++ b/build.rs @@ -12,4 +12,19 @@ compile_error!( If you are unsure, go with `rustls_backend`." ); -fn main() {} +#[cfg_attr( + feature = "simdjson", + deprecated = "The `simdjson` feature name is deprecated and will be removed in the next version of serenity, use `simd_json`." +)] +fn deprecated_simd_json_feature() {} + +#[cfg_attr( + feature = "voice-model", + deprecated = "The `voice-model` feature name is deprecated and will be removed in the next version of serenity, use `voice_model`." +)] +fn deprecated_voice_model_feature() {} + +fn main() { + deprecated_simd_json_feature(); + deprecated_voice_model_feature() +}