Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

[feature] #224: Ursa bump to edition 2021 and trivial dependencies #225

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

appetrosyan
Copy link
Contributor

Simple version bump for all Rust edition 2015 idioms.

Description of change

  • Applied cargo fix --edition

Issues

Closes #224

Testing

Tests added

No extra tests added

Existing tests

Not altered

Local test runs

Apple M2 - Pending

Discussion

## Pros

  • Able to link with newer libraries
  • More idiomatic modern Rust

Cons

  • No longer backwards compatible

Special comments

Change of MSRV

@@ -26,30 +26,37 @@ jobs:
- name: Build
working-directory: ${{ matrix.workdir }}
run: cargo build --verbose
if: always()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure if someone forgot to format, and docs, and has live lints, that they use $O(n)$ rather than $O(n^2)$ CI time.

wasm-bindgen = { version = "0.2", optional = true, features = ["serde-serialize"] }
x25519-dalek = { version = "1.1", optional = true, default-features = false }
zeroize = { version = "1.1", features = ["zeroize_derive"], optional = true }
x25519-dalek = { version = "1.2.1", optional = true, default-features = false, git = "https://github.com/appetrosyan/x25519-dalek" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this vendored like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary until the PR into dalek is accepted. While the lib is small, other projects would benefit from unpinning dalek from old zeroize

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively, could we point to the dalek 2.0 release branch? https://github.com/dalek-cryptography/x25519-dalek/tree/release/2.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its seems v2.0.0-rc.2 has been released to crates.io, so that could be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, 2.0.0-rc.2 has the wrong version of rand for this PR to not also have to change a few APIs. I'm afraid the vendoring will have to stay for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its seems v2.0.0-rc.2 has been released to crates.io, so that could be used.

Unfortunately, that version uses the incorrect version of rand, so we can't really upgrade to that one yet.

For now, I'm afraid the vendoring is the best option. Given that we don't have any semver guarantees just yet, I'll accompany that change with a semver bump.

@appetrosyan appetrosyan mentioned this pull request Feb 20, 2023
9 tasks
@appetrosyan appetrosyan changed the title [feature] #224: Ensure Ursa compiles with Rust edition 2021 [feature] #224: Ursa bump to edition 2021 and trivial dependencies Feb 20, 2023
@ryjones
Copy link
Contributor

ryjones commented Mar 16, 2023

@brentzundel thoughts?

@brentzundel
Copy link
Contributor

It was my understanding that @appetrosyan was planning to update the reference to Dalek to no longer point at his personal repository. At that point I'm happy to approve and merge.

@ryjones ryjones force-pushed the main branch 3 times, most recently from c7eee07 to f82333c Compare April 24, 2023 19:36
@appetrosyan appetrosyan mentioned this pull request Apr 24, 2023
@appetrosyan
Copy link
Contributor Author

@brentzundel

It was my understanding that @appetrosyan was planning to update the reference to Dalek to no longer point at his personal repository. At that point I'm happy to approve and merge.

I'm afraid that this is not an option as of yet. To upgrade to dalek-25519 ="2.0.0-rc.2" would require updating non-trivial dependencies. I'm not comfortable breaking the API in main.

@ryjones
Copy link
Contributor

ryjones commented Apr 24, 2023

@appetrosyan please see #233

@ryjones ryjones merged commit caa36e9 into hyperledger-archives:main Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[version] Update to Rust edition 2021
5 participants