diff --git a/CHANGELOG.md b/CHANGELOG.md index 72782046..1bad9c64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ versions. - NIF implementations are now discovered automatically and the respective argument of `rustler::init!` is ignored (#613) +- The `derive` feature flag is now ignored and its functionality unconditionally + enabled (#621) ### Removed diff --git a/UPGRADE.md b/UPGRADE.md index d48083a9..4eed3113 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -7,6 +7,9 @@ This document is intended to simplify upgrading to newer versions by extending t 1. NIF implementations are now discovered automatically, the respective argument in the `rustler::init!` macro should be removed. If a NIF implementation should not be exported, it must be disabled with a `#[cfg]` marker. +2. The functionality related to the `derive` feature is now unconditionally + active. The feature flag is kept for compatibility for now but will be + removed in the future. ## 0.32 -> 0.33 diff --git a/rustler/Cargo.toml b/rustler/Cargo.toml index 4401f23a..333cee89 100644 --- a/rustler/Cargo.toml +++ b/rustler/Cargo.toml @@ -11,8 +11,8 @@ rust-version = "1.70" [features] big_integer = ["dep:num-bigint"] -default = ["derive", "nif_version_2_15"] -derive = ["rustler_codegen"] +default = ["nif_version_2_15"] +derive = [] alternative_nif_init_name = [] allocator = [] nif_version_2_14 = ["rustler_sys/nif_version_2_14"] @@ -23,7 +23,7 @@ serde = ["dep:serde"] [dependencies] inventory = "0.3" -rustler_codegen = { path = "../rustler_codegen", version = "0.33.0", optional = true} +rustler_codegen = { path = "../rustler_codegen", version = "0.33.0" } rustler_sys = { path = "../rustler_sys", version = "~2.4.1" } num-bigint = { version = "0.4", optional = true } serde = { version = "1", optional = true } diff --git a/rustler/src/lib.rs b/rustler/src/lib.rs index 46a3ffc0..e6e4003a 100644 --- a/rustler/src/lib.rs +++ b/rustler/src/lib.rs @@ -71,7 +71,6 @@ pub use nif::Nif; pub type NifResult = Result; -#[cfg(feature = "derive")] pub use rustler_codegen::{ init, nif, NifException, NifMap, NifRecord, NifStruct, NifTaggedEnum, NifTuple, NifUnitEnum, NifUntaggedEnum,