Skip to content

pure-rust via cfg("aegis_backend" = "..") vs cfg(feature = "..") #5

Closed
@pinkforest

Description

@pinkforest

Hey thanks for working on this! Great stuff

Would you be open to moving the cfg(feature = "pure-rust") into as:

cfg("aegis_backend" = "libaegis" | "rust" | ..)

Happy to send a PR - ideally the selection is automatic but we provide "overrides" in curve25519_dalek f.ex.

We had extensive discussion over here re: features vs cfg when we bumped to curve25519 to v4:

I would recommend having this mutual exclusive override as cfg due to;

  • Allows top-level binary composing the primitive as the overarching choice and transients not having any say
  • Transient dependencies don't need to "relay" it down - dalek itself (via ed/x f.ex.) long time didn't relay the overrides
  • The compiler / cargo has now taken official stance on it to support the pattern
  • Composes as mutually exclusive feature vs features are not mutually exclusive
  • Other issues discussed in the long winded ref'd issue

The compiler now supports validating cfg (requires high MSRV though so we've ignored it until MSRV is high enough)

Ref:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions