Skip to content

Commit

Permalink
[feature] hyperledger-archives#224: Ensure Ursa compiles with Rust ed…
Browse files Browse the repository at this point in the history
…ition 2021

Signed-off-by: Aleksandr Petrosyan <a-p-petrosyan@yandex.ru>
  • Loading branch information
appetrosyan committed Apr 24, 2023
1 parent 390f004 commit f8943f1
Show file tree
Hide file tree
Showing 33 changed files with 189 additions and 164 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,37 @@ jobs:
- name: Build
working-directory: ${{ matrix.workdir }}
run: cargo build --verbose
if: always()

- name: Format
working-directory: ${{ matrix.workdir }}
run: cargo fmt --all -- --check
if: always()

- name: Docs
working-directory: ${{ matrix.workdir }}
run: cargo doc --no-deps
if: always()

- name: Clippy
working-directory: ${{ matrix.workdir }}
run: cargo clippy --all -- -W clippy::not_unsafe_ptr_arg_deref -A clippy::many_single_char_names
if: always()

- name: Check
working-directory: ${{ matrix.workdir }}
run: cargo check
if: always()

- name: Tests
working-directory: ${{ matrix.workdir }}
run: cargo test --release
if: always()

- name: Audit
working-directory: ${{ matrix.workdir }}
run: cargo audit
if: always()

# disabled in AZP
#
Expand Down
122 changes: 70 additions & 52 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions libursa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
name = "ursa"
version = "0.3.7"
authors = ["Hyperledger Ursa Contributors"]
description = "This is the shared crypto library for Hyperledger components."
description = "The Hyperledger Cryptographic library."
license = "Apache-2.0"
readme = "../README.md"
repository = "https://github.com/hyperledger/ursa"
documentation = "https://docs.rs/ursa"
homepage = "https://crates.io/crates/ursa"
edition = "2021"
keywords = ["cryptography", "aead", "hash", "signature", "zero-knowledge"]
include = [
"src/bls/**/*.rs",
Expand Down Expand Up @@ -177,7 +178,7 @@ license-file = ["../LICENSE", "0"]
copyright = "2019, Hyperledger"
depends = "$auto"
extended-description = """\
Rust written reliable, secure, easy-to-use, and pluggable cryptographic implementations."""
Rust-written reliable, secure, easy-to-use, and pluggable cryptographic implementations."""
section = "admin"
revision = "1"
priority = "optional"
Expand Down
4 changes: 2 additions & 2 deletions libursa/src/bls/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use errors::prelude::*;
use pair::{GroupOrderElement, Pair, PointG1, PointG2};
use crate::errors::prelude::*;
use crate::pair::{GroupOrderElement, Pair, PointG1, PointG2};

#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion libursa/src/bn/openssl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use errors::prelude::*;
use crate::errors::prelude::*;

use int_traits::IntTraits;

Expand Down
2 changes: 1 addition & 1 deletion libursa/src/cl/constants.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bn::{BigNumber, BIGNUMBER_2};
use crate::bn::{BigNumber, BIGNUMBER_2};

pub const LARGE_MASTER_SECRET: usize = 256;
pub const LARGE_E_START: usize = 596;
Expand Down
Loading

0 comments on commit f8943f1

Please sign in to comment.