Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on crates from asm-hashes #542

Merged
merged 7 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions .github/workflows/md5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.71.0
msrv: 1.72.0

build:
needs: set-msrv
Expand All @@ -37,6 +37,7 @@ jobs:
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
- loongarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
Expand All @@ -45,7 +46,7 @@ jobs:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std

test:
needs: set-msrv
Expand All @@ -64,18 +65,6 @@ jobs:
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset

# Build-only test of the LoongArch64 assembly backend
loongarch64_asm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.72
targets: loongarch64-unknown-linux-gnu
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
Expand Down
28 changes: 4 additions & 24 deletions .github/workflows/sha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.71.0
msrv: 1.72.0

# Builds for no_std platforms
build:
Expand All @@ -35,6 +35,7 @@ jobs:
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
- loongarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
Expand All @@ -43,7 +44,7 @@ jobs:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
Expand All @@ -57,8 +58,6 @@ jobs:
matrix:
include:
# 32-bit Linux/x86
# *** NOTE: Currently broken with `asm` feature enabled! See:
# https://github.com/RustCrypto/hashes/issues/251
#- target: i686-unknown-linux-gnu
# rust: ${{needs.set-msrv.outputs.msrv}}
# deps: sudo apt update && sudo apt install gcc-multilib
Expand Down Expand Up @@ -103,7 +102,6 @@ jobs:
targets: x86_64-apple-darwin
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --features asm
- run: cargo test --all-features

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

# Build-only test of the LoongArch64 assembly backend
loongarch64_asm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.72
targets: loongarch64-unknown-linux-gnu
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm

# Cross-compiled tests
cross:
strategy:
matrix:
rust:
- 1.71.0
- 1.72.0
- stable
target:
- aarch64-unknown-linux-gnu
- powerpc-unknown-linux-gnu
features:
- default
# **** NOTE: Currently broken with `asm` feature enabled! See:
# https://github.com/RustCrypto/hashes/issues/251
# include:
# - rust: stable
# target: aarch64-unknown-linux-gnu
# features: asm

runs-on: ubuntu-latest
defaults:
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/sha2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.71.0
msrv: 1.72.0

# Builds for no_std platforms
build:
Expand All @@ -30,11 +30,12 @@ jobs:
strategy:
matrix:
rust:
- 1.71.0
- ${{needs.set-msrv.outputs.msrv}}
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
- loongarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
Expand All @@ -43,7 +44,7 @@ jobs:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm-aarch64,asm
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std

# Linux tests
linux:
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: ${{ matrix.deps }}
- run: cargo hack test --feature-powerset --exclude-features asm-aarch64
- run: cargo hack test --feature-powerset

# macOS tests
macos:
Expand All @@ -95,7 +96,6 @@ jobs:
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --features asm
- run: cargo test --all-features

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

# Build-only test of the LoongArch64 assembly backend
loongarch64_asm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.72
targets: loongarch64-unknown-linux-gnu
- run: cargo build --target loongarch64-unknown-linux-gnu --features loongarch64_asm

# Cross-compiled tests
cross:
needs: set-msrv
Expand All @@ -144,10 +132,6 @@ jobs:
- powerpc-unknown-linux-gnu
features:
- default
include:
- rust: stable
target: aarch64-unknown-linux-gnu
features: asm
runs-on: ubuntu-latest
defaults:
run:
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/whirlpool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std,asm
- run: cargo hack build --target ${{ matrix.target }} --each-feature --exclude-features default,std

test:
needs: set-msrv
Expand All @@ -59,19 +59,9 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset --exclude-features asm
- run: cargo hack test --feature-powerset

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

test-asm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable # cc has a relaxed MSRV policy
- run: cargo test --features asm
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.71.0
toolchain: 1.75.0
components: clippy
- run: cargo clippy --all -- -D warnings

Expand Down
49 changes: 0 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Additionally all crates do not require the standard library (i.e. `no_std` capab
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
| [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: |
Expand Down Expand Up @@ -234,6 +234,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg
[deps-link]: https://deps.rs/repo/github/RustCrypto/hashes
[msrv-1.71]: https://img.shields.io/badge/rustc-1.71.0+-blue.svg
[msrv-1.72]: https://img.shields.io/badge/rustc-1.72.0+-blue.svg

[//]: # (crates)

Expand Down
6 changes: 6 additions & 0 deletions md5/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## UNRELEASED
### Removed
- `asm` and `loongarch64_asm` crate features [#542]

[#542]: https://github.com/RustCrypto/hashes/pull/542

## 0.10.6 (2023-09-22)
### Added
- `asm!`-based backend for LoongArch64 targets gated behind `loongarch64_asm` feature [#505]
Expand Down
11 changes: 2 additions & 9 deletions md5/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ documentation = "https://docs.rs/md-5"
repository = "https://github.com/RustCrypto/hashes"
keywords = ["crypto", "md5", "hash", "digest"]
categories = ["cryptography", "no-std"]
rust-version = "1.71"
rust-version = "1.72"

[lib]
name = "md5"
Expand All @@ -19,19 +19,12 @@ name = "md5"
digest = "=0.11.0-pre.4"
cfg-if = "1"

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
md5-asm = { version = "0.5", optional = true }

[dev-dependencies]
digest = { version = "=0.11.0-pre.4", features = ["dev"] }
hex-literal = "0.4"

[features]
default = ["oid", "std"]
std = ["digest/std"]
asm = ["md5-asm"] # WARNING: this feature SHOULD NOT be enabled by library crates
# Use assembly backend for LoongArch64 targets
# WARNING: Bumps MSRV to 1.72. This feature SHOULD NOT be enabled by library crates
loongarch64_asm = []
oid = ["digest/oid"] # Enable OID support.
oid = ["digest/oid"] # Enable OID support
force-soft = [] # Force software implementation
Loading
Loading