Skip to content

Commit d5eefb0

Browse files
authored
Remove dependency on crates from asm-hashes (#542)
1 parent f96fc4b commit d5eefb0

26 files changed

Lines changed: 65 additions & 198 deletions

.github/workflows/md5.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
set-msrv:
2525
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
2626
with:
27-
msrv: 1.71.0
27+
msrv: 1.72.0
2828

2929
build:
3030
needs: set-msrv
@@ -37,6 +37,7 @@ jobs:
3737
target:
3838
- thumbv7em-none-eabi
3939
- wasm32-unknown-unknown
40+
- loongarch64-unknown-linux-gnu
4041
steps:
4142
- uses: actions/checkout@v4
4243
- uses: RustCrypto/actions/cargo-cache@master
@@ -45,7 +46,7 @@ jobs:
4546
toolchain: ${{ matrix.rust }}
4647
targets: ${{ matrix.target }}
4748
- uses: RustCrypto/actions/cargo-hack-install@master
48-
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
49+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4950

5051
test:
5152
needs: set-msrv
@@ -64,18 +65,6 @@ jobs:
6465
- uses: RustCrypto/actions/cargo-hack-install@master
6566
- run: cargo hack test --feature-powerset
6667

67-
# Build-only test of the LoongArch64 assembly backend
68-
loongarch64_asm:
69-
runs-on: ubuntu-latest
70-
steps:
71-
- uses: actions/checkout@v4
72-
- uses: RustCrypto/actions/cargo-cache@master
73-
- uses: dtolnay/rust-toolchain@master
74-
with:
75-
toolchain: 1.72
76-
targets: loongarch64-unknown-linux-gnu
77-
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm
78-
7968
minimal-versions:
8069
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
8170
with:

.github/workflows/sha1.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
set-msrv:
2222
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
2323
with:
24-
msrv: 1.71.0
24+
msrv: 1.72.0
2525

2626
# Builds for no_std platforms
2727
build:
@@ -35,6 +35,7 @@ jobs:
3535
target:
3636
- thumbv7em-none-eabi
3737
- wasm32-unknown-unknown
38+
- loongarch64-unknown-linux-gnu
3839
steps:
3940
- uses: actions/checkout@v4
4041
- uses: RustCrypto/actions/cargo-cache@master
@@ -43,7 +44,7 @@ jobs:
4344
toolchain: ${{ matrix.rust }}
4445
targets: ${{ matrix.target }}
4546
- uses: RustCrypto/actions/cargo-hack-install@master
46-
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
47+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4748

4849
minimal-versions:
4950
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
@@ -57,8 +58,6 @@ jobs:
5758
matrix:
5859
include:
5960
# 32-bit Linux/x86
60-
# *** NOTE: Currently broken with `asm` feature enabled! See:
61-
# https://github.com/RustCrypto/hashes/issues/251
6261
#- target: i686-unknown-linux-gnu
6362
# rust: ${{needs.set-msrv.outputs.msrv}}
6463
# deps: sudo apt update && sudo apt install gcc-multilib
@@ -103,7 +102,6 @@ jobs:
103102
targets: x86_64-apple-darwin
104103
- run: cargo test --no-default-features
105104
- run: cargo test
106-
- run: cargo test --features asm
107105
- run: cargo test --all-features
108106

109107
# Windows tests
@@ -129,36 +127,18 @@ jobs:
129127
- uses: msys2/setup-msys2@v2
130128
- run: cargo test --target ${{ matrix.target }}
131129

132-
# Build-only test of the LoongArch64 assembly backend
133-
loongarch64_asm:
134-
runs-on: ubuntu-latest
135-
steps:
136-
- uses: actions/checkout@v4
137-
- uses: RustCrypto/actions/cargo-cache@master
138-
- uses: dtolnay/rust-toolchain@master
139-
with:
140-
toolchain: 1.72
141-
targets: loongarch64-unknown-linux-gnu
142-
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm
143-
144130
# Cross-compiled tests
145131
cross:
146132
strategy:
147133
matrix:
148134
rust:
149-
- 1.71.0
135+
- 1.72.0
150136
- stable
151137
target:
152138
- aarch64-unknown-linux-gnu
153139
- powerpc-unknown-linux-gnu
154140
features:
155141
- default
156-
# **** NOTE: Currently broken with `asm` feature enabled! See:
157-
# https://github.com/RustCrypto/hashes/issues/251
158-
# include:
159-
# - rust: stable
160-
# target: aarch64-unknown-linux-gnu
161-
# features: asm
162142

163143
runs-on: ubuntu-latest
164144
defaults:

.github/workflows/sha2.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
set-msrv:
2222
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
2323
with:
24-
msrv: 1.71.0
24+
msrv: 1.72.0
2525

2626
# Builds for no_std platforms
2727
build:
@@ -30,11 +30,12 @@ jobs:
3030
strategy:
3131
matrix:
3232
rust:
33-
- 1.71.0
33+
- ${{needs.set-msrv.outputs.msrv}}
3434
- stable
3535
target:
3636
- thumbv7em-none-eabi
3737
- wasm32-unknown-unknown
38+
- loongarch64-unknown-linux-gnu
3839
steps:
3940
- uses: actions/checkout@v4
4041
- uses: RustCrypto/actions/cargo-cache@master
@@ -43,7 +44,7 @@ jobs:
4344
toolchain: ${{ matrix.rust }}
4445
targets: ${{ matrix.target }}
4546
- uses: RustCrypto/actions/cargo-hack-install@master
46-
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm-aarch64,asm
47+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4748

4849
# Linux tests
4950
linux:
@@ -74,7 +75,7 @@ jobs:
7475
targets: ${{ matrix.target }}
7576
- uses: RustCrypto/actions/cargo-hack-install@master
7677
- run: ${{ matrix.deps }}
77-
- run: cargo hack test --feature-powerset --exclude-features asm-aarch64
78+
- run: cargo hack test --feature-powerset
7879

7980
# macOS tests
8081
macos:
@@ -95,7 +96,6 @@ jobs:
9596
- uses: RustCrypto/actions/cargo-hack-install@master
9697
- run: cargo test --no-default-features
9798
- run: cargo test
98-
- run: cargo test --features asm
9999
- run: cargo test --all-features
100100

101101
# Windows tests
@@ -119,18 +119,6 @@ jobs:
119119
- uses: msys2/setup-msys2@v2
120120
- run: cargo test --target ${{ matrix.target }}
121121

122-
# Build-only test of the LoongArch64 assembly backend
123-
loongarch64_asm:
124-
runs-on: ubuntu-latest
125-
steps:
126-
- uses: actions/checkout@v4
127-
- uses: RustCrypto/actions/cargo-cache@master
128-
- uses: dtolnay/rust-toolchain@master
129-
with:
130-
toolchain: 1.72
131-
targets: loongarch64-unknown-linux-gnu
132-
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm
133-
134122
# Cross-compiled tests
135123
cross:
136124
needs: set-msrv
@@ -144,10 +132,6 @@ jobs:
144132
- powerpc-unknown-linux-gnu
145133
features:
146134
- default
147-
include:
148-
- rust: stable
149-
target: aarch64-unknown-linux-gnu
150-
features: asm
151135
runs-on: ubuntu-latest
152136
defaults:
153137
run:

.github/workflows/whirlpool.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
toolchain: ${{ matrix.rust }}
4343
targets: ${{ matrix.target }}
4444
- uses: RustCrypto/actions/cargo-hack-install@master
45-
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
45+
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std
4646

4747
test:
4848
needs: set-msrv
@@ -59,19 +59,9 @@ jobs:
5959
with:
6060
toolchain: ${{ matrix.rust }}
6161
- uses: RustCrypto/actions/cargo-hack-install@master
62-
- run: cargo hack test --feature-powerset --exclude-features asm
62+
- run: cargo hack test --feature-powerset
6363

6464
minimal-versions:
6565
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
6666
with:
6767
working-directory: ${{ github.workflow }}
68-
69-
test-asm:
70-
runs-on: ubuntu-latest
71-
steps:
72-
- uses: actions/checkout@v4
73-
- uses: RustCrypto/actions/cargo-cache@master
74-
- uses: dtolnay/rust-toolchain@master
75-
with:
76-
toolchain: stable # cc has a relaxed MSRV policy
77-
- run: cargo test --features asm

.github/workflows/workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: RustCrypto/actions/cargo-cache@master
1818
- uses: dtolnay/rust-toolchain@master
1919
with:
20-
toolchain: 1.71.0
20+
toolchain: 1.75.0
2121
components: clippy
2222
- run: cargo clippy --all -- -D warnings
2323

Cargo.lock

Lines changed: 0 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Additionally all crates do not require the standard library (i.e. `no_std` capab
2323
| [KangarooTwelve] | [`k12`] | [![crates.io](https://img.shields.io/crates/v/k12.svg)](https://crates.io/crates/k12) | [![Documentation](https://docs.rs/k12/badge.svg)](https://docs.rs/k12) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
2424
| [MD2] | [`md2`] | [![crates.io](https://img.shields.io/crates/v/md2.svg)](https://crates.io/crates/md2) | [![Documentation](https://docs.rs/md2/badge.svg)](https://docs.rs/md2) | ![MSRV 1.71][msrv-1.71] | :broken_heart: |
2525
| [MD4] | [`md4`] | [![crates.io](https://img.shields.io/crates/v/md4.svg)](https://crates.io/crates/md4) | [![Documentation](https://docs.rs/md4/badge.svg)](https://docs.rs/md4) | ![MSRV 1.71][msrv-1.71] | :broken_heart: |
26-
| [MD5] | [`md5`] [:exclamation:] | [![crates.io](https://img.shields.io/crates/v/md-5.svg)](https://crates.io/crates/md-5) | [![Documentation](https://docs.rs/md-5/badge.svg)](https://docs.rs/md-5) | ![MSRV 1.71][msrv-1.71] | :broken_heart: |
26+
| [MD5] | [`md5`] [:exclamation:] | [![crates.io](https://img.shields.io/crates/v/md-5.svg)](https://crates.io/crates/md-5) | [![Documentation](https://docs.rs/md-5/badge.svg)](https://docs.rs/md-5) | ![MSRV 1.72][msrv-1.72] | :broken_heart: |
2727
| [RIPEMD] | [`ripemd`] | [![crates.io](https://img.shields.io/crates/v/ripemd.svg)](https://crates.io/crates/ripemd) | [![Documentation](https://docs.rs/ripemd/badge.svg)](https://docs.rs/ripemd) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
28-
| [SHA-1] | [`sha1`] | [![crates.io](https://img.shields.io/crates/v/sha1.svg)](https://crates.io/crates/sha1) | [![Documentation](https://docs.rs/sha1/badge.svg)](https://docs.rs/sha1) | ![MSRV 1.71][msrv-1.71] | :broken_heart: |
29-
| [SHA-2] | [`sha2`] | [![crates.io](https://img.shields.io/crates/v/sha2.svg)](https://crates.io/crates/sha2) | [![Documentation](https://docs.rs/sha2/badge.svg)](https://docs.rs/sha2) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
28+
| [SHA-1] | [`sha1`] | [![crates.io](https://img.shields.io/crates/v/sha1.svg)](https://crates.io/crates/sha1) | [![Documentation](https://docs.rs/sha1/badge.svg)](https://docs.rs/sha1) | ![MSRV 1.72][msrv-1.72] | :broken_heart: |
29+
| [SHA-2] | [`sha2`] | [![crates.io](https://img.shields.io/crates/v/sha2.svg)](https://crates.io/crates/sha2) | [![Documentation](https://docs.rs/sha2/badge.svg)](https://docs.rs/sha2) | ![MSRV 1.72][msrv-1.72] | :green_heart: |
3030
| [SHA-3] (Keccak) | [`sha3`] | [![crates.io](https://img.shields.io/crates/v/sha3.svg)](https://crates.io/crates/sha3) | [![Documentation](https://docs.rs/sha3/badge.svg)](https://docs.rs/sha3) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
3131
| [SHABAL] | [`shabal`] | [![crates.io](https://img.shields.io/crates/v/shabal.svg)](https://crates.io/crates/shabal) | [![Documentation](https://docs.rs/shabal/badge.svg)](https://docs.rs/shabal) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
3232
| [Skein] | [`skein`] | [![crates.io](https://img.shields.io/crates/v/skein.svg)](https://crates.io/crates/skein) | [![Documentation](https://docs.rs/skein/badge.svg)](https://docs.rs/skein) | ![MSRV 1.71][msrv-1.71] | :green_heart: |
@@ -234,6 +234,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
234234
[deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg
235235
[deps-link]: https://deps.rs/repo/github/RustCrypto/hashes
236236
[msrv-1.71]: https://img.shields.io/badge/rustc-1.71.0+-blue.svg
237+
[msrv-1.72]: https://img.shields.io/badge/rustc-1.72.0+-blue.svg
237238

238239
[//]: # (crates)
239240

md5/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## UNRELEASED
9+
### Removed
10+
- `asm` and `loongarch64_asm` crate features [#542]
11+
12+
[#542]: https://github.com/RustCrypto/hashes/pull/542
13+
814
## 0.10.6 (2023-09-22)
915
### Added
1016
- `asm!`-based backend for LoongArch64 targets gated behind `loongarch64_asm` feature [#505]

md5/Cargo.toml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ documentation = "https://docs.rs/md-5"
1010
repository = "https://github.com/RustCrypto/hashes"
1111
keywords = ["crypto", "md5", "hash", "digest"]
1212
categories = ["cryptography", "no-std"]
13-
rust-version = "1.71"
13+
rust-version = "1.72"
1414

1515
[lib]
1616
name = "md5"
@@ -19,19 +19,12 @@ name = "md5"
1919
digest = "=0.11.0-pre.4"
2020
cfg-if = "1"
2121

22-
[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
23-
md5-asm = { version = "0.5", optional = true }
24-
2522
[dev-dependencies]
2623
digest = { version = "=0.11.0-pre.4", features = ["dev"] }
2724
hex-literal = "0.4"
2825

2926
[features]
3027
default = ["oid", "std"]
3128
std = ["digest/std"]
32-
asm = ["md5-asm"] # WARNING: this feature SHOULD NOT be enabled by library crates
33-
# Use assembly backend for LoongArch64 targets
34-
# WARNING: Bumps MSRV to 1.72. This feature SHOULD NOT be enabled by library crates
35-
loongarch64_asm = []
36-
oid = ["digest/oid"] # Enable OID support.
29+
oid = ["digest/oid"] # Enable OID support
3730
force-soft = [] # Force software implementation

0 commit comments

Comments
 (0)