Skip to content

Simplifying backend selection #414

Description

@tarcieri

curve25519-dalek currently defines the following backends, modeled as crate features:

  • u32_backend
  • u64_backend
  • fiat_u32_backend
  • fiat_u64_backend
  • simd_backend
  • avx2_backend

First, avx2_backend can be removed: it's a deprecated legacy alias for simd_backend.

Second, I think u32_backend and u64_backend could be selected automatically by gating on e.g. cfg(target_pointer_width = "64"). If this selection were automatic, I think these features could be removed completely, with u32_backend/u64_backend selected and used by default unless another backend has been explicitly enabled.

Likewise, fiat_u64_backend and fiat_u32_backend can be collapsed down to fiat_backend using similar target_pointer_width-based gating.

If all of the above were done, the list above could be simplified down to just fiat_backend and simd_backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    do-for-4.0This should be resolved before we do a 4.0 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions