hyperledger-archives / ursa

Hyperledger Ursa (a shared cryptographic library) has moved to end-of-life status, with the components of Ursa still in use moved to their relevant Hyperledger projects (AnonCreds, Indy, Aries and Iroha).

Home Page:https://wiki.hyperledger.org/display/ursa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create the top-level project library

mikelodder7 opened this issue · comments

The top-level Ursa project file and folder structure will look like the following:

ursa
|
ursa_circuits
ursa_core
ursa_encryption
ursa_dkg
ursa_keyagreement
ursa_sharing
ursa_shortgroupsignatures
ursa_signatures

...
src
Cargo.toml
Cargo.lock
CHANGELOG
CODEOWNERS
CONTRIBUTING
LICENSE
README.md
RELEASES.md
SECURITY.md
rustfmt.toml
...

The point of the top level project is to

  1. Provide a single crate for developers that reexports or wraps subprojects
  2. Provide a common place for APIs to be named and defined for Rust, FFI and WASM

The current Cargo.toml file only contains the following:

[profile.release]
lto = true

[workspace]
members = [
  "libursa",
  "libzmix",
  "libzmix/bulletproofs_amcl",
  "libzmix/bbs",
]

This will need to be modified to accomadate the new subprojects as they are created. Some hints for how the end result could look like are the rand crate where it has multiple subprojects and itself is a crate.

I was curious to pick up the hyperledger-archives/ursa-wrapper-go#8 issue. But the go wrapper requires workspace package feature to be enabled. The default build does not include ffi wrappers in it. Rust stable release currently does not have an option to enable package features.

Here's what I did (ref: https://github.com/arsulegai/ursa/tree/fix-path)
Step 1: Introduce a feature similar to ursa_sharing to enable cl_native and create the required .so file.
Step 2: Step 1 ends up in the conflict that the same name ursa is in both Cargo.toml and libursa/Cargo.toml.

I was planning to rename the Cargo.toml's name from usa to hyperledger-ursa. Any suggestions/preferences?