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).
https://wiki.hyperledger.org/display/ursa
Apache License 2.0
321 stars 142 forks source link

Create the top-level project library #152

Open mikelodder7 opened 3 years ago

mikelodder7 commented 3 years ago

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 1. 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: ```toml [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](https://github.com/rust-random/rand) crate where it has multiple subprojects and itself is a crate.
arsulegai commented 3 years ago

I was curious to pick up the https://github.com/hyperledger/ursa-wrapper-go/issues/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?