Skip to content

zeroize: Remove 'nightly' feature#183

Merged
tony-iqlusion merged 1 commit intodevelopfrom
zeroize/remove-nightly-feature
May 19, 2019
Merged

zeroize: Remove 'nightly' feature#183
tony-iqlusion merged 1 commit intodevelopfrom
zeroize/remove-nightly-feature

Conversation

@tony-iqlusion
Copy link
Copy Markdown
Member

Zeroize previously provided a 'nightly' feature which used a slightly more complex implementation in order to facilitate a micro-optimization: namely it used volatile_set_memory on nightly to efficiently byte slices (which typically thunks to memset() followed by a fence instruction).

However, the extra complexity was never justified through benchmarking, nor does it represent the desired path forward on nightly (which would be to use atomic writes instead of volatile writes, when they become available but aren't yet stabilized).

It also seems some Zeroize impls are missing, particularly for arrays, in which case the special-case nightly impls become more cumbersome.

This commit rips out the entire nightly feature and ensures the crate behaves the same way everywhere regardless of Rust channel.

@tarcieri tarcieri force-pushed the zeroize/remove-nightly-feature branch from d6d1ccc to 14799e1 Compare May 19, 2019 17:57
Zeroize previously provided a 'nightly' feature which used a slightly
more complex implementation in order to facilitate a micro-optimization.

However, the extra complexity was never justified, nor does it represent
the desired path forward on nightly (which would be to use atomic writes
instead of volatile writes, when they become available but aren't yet
stabilized).

It also seems some impls are missing, particularly for arrays, in which
case the special-case nightly impls become more cumbersome.

This commit rips out the entire nightly feature and ensures the crate
behaves the same way everywhere regardless of Rust channel.
@tarcieri tarcieri force-pushed the zeroize/remove-nightly-feature branch from 14799e1 to ebc8531 Compare May 19, 2019 18:11
@tony-iqlusion tony-iqlusion merged commit 604f0d4 into develop May 19, 2019
@tony-iqlusion tony-iqlusion deleted the zeroize/remove-nightly-feature branch May 19, 2019 18:15
@tony-iqlusion tony-iqlusion mentioned this pull request May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant