Skip to content

Commit 4302ac0

Browse files
committed
zeroize: Disable zeroize_derive feature by default
Proc macros are a somewhat onerous dependency due to the amount of time it takes to compile crates like `syn`, and many will prefer explicit implementations to ones derived via proc macros. This commit removes `zeroize_derive` from the default feature list.
1 parent 03d62b4 commit 4302ac0

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

zeroize/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ travis-ci = { repository = "iqlusioninc/crates", branch = "develop" }
2424
zeroize_derive = { version = "0.9", path = "../zeroize_derive", optional = true }
2525

2626
[features]
27-
default = ["alloc", "zeroize_derive"]
27+
default = ["alloc"]
2828
alloc = []
29+
30+
[package.metadata.docs.rs]
31+
all-features = true

zeroize/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ and [core::sync::atomic] memory fences to provide easy-to-use, portable
2828
zeroing behavior which works on all of Rust's core number types and slices
2929
thereof, implemented in pure Rust with no usage of FFI or assembly.
3030

31-
- **No insecure fallbacks!**
32-
- **No dependencies!**
33-
- **No FFI or inline assembly!**
34-
- `#![no_std]` **i.e. embedded-friendly**!
35-
- **No functionality besides securely zeroing memory!**
31+
- No insecure fallbacks!
32+
- No dependencies!
33+
- No FFI or inline assembly! **WASM friendly** (and tested)!
34+
- `#![no_std]` i.e. **embedded-friendly**!
35+
- No functionality besides securely zeroing memory!
36+
- (Optional) Custom derive support for zeroing complex structures
3637

3738
## Requirements
3839

zeroize/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! - No FFI or inline assembly! **WASM friendly** (and tested)!
1919
//! - `#![no_std]` i.e. **embedded-friendly**!
2020
//! - No functionality besides securely zeroing memory!
21+
//! - (Optional) Custom derive support for zeroing complex structures
2122
//!
2223
//! ## Usage
2324
//!
@@ -52,8 +53,10 @@
5253
//!
5354
//! ## Custom Derive Support
5455
//!
55-
//! This crate has custom derive support for the `Zeroize` trait, which
56-
//! automatically calls `zeroize()` on all members of a struct or tuple struct.
56+
//! This crate has custom derive support for the `Zeroize` trait,
57+
//! gated under the `zeroize` crate's `zeroize_derive` Cargo feature,
58+
//! which automatically calls `zeroize()` on all members of a struct
59+
//! or tuple struct.
5760
//!
5861
//! Additionally it supports the following attribute:
5962
//!

0 commit comments

Comments
 (0)