Closed gmesika-coti closed 1 year ago
A lot has happened since then! :-)
The CL Signatures part of Ursa has moved out of Ursa and into the AnonCreds project. For AnonCreds 1.0, this is just a dependency change in the implementation — not a big impact. So AnonCreds is now self-contained from that perspective and is no longer dependent on Ursa.
Indy is now just a ledger for publishing objects useful in using AnonCreds. The AnonCreds part of Indy has been moved to the AnonCreds project itself, and the broader SDK part of Indy — the SSI Agent part — is one of the elements of Aries. The indy SDK remaining is just the client interface for reading and writing Indy objects from/to the ledger.
Thanks for the prompt reply! I Think I kind of mislead the answer to my question. Any how, you mentioned that AnnonCreds is now self contained and no longer dependent on ursa. but ursa is still one of the dependencies of the project and cant be removed. now that ursa is deprecated (even in the GitHub shown as read-only) is there a plan to remove it as a dependency from the AnnonCreds GitHub rust project?
anoncreds-rs is currently dependent on Ursa, but most of the work has been done to change that dependency to anoncreds-clsignatures-rs. That should be completed very soon, and when done will eliminate the dependency on Ursa. The code is a derivative of the Ursa could — extracted from the Ursa library and improved.
Does that answer your question?
yes! thanks a lot. it is still dependent on the openssl which is having trouble for me to compile with --target=wasm32-unknown-unknown
I’ve heard about issues with OpenSSL and WASM, but don’t know the details — I think it was mentioned on another issue. @blu3beri — do you know about that?
Yeah openssl and WASM is a bit odd. There is this repository of the creator of libsodium. It should compile to WASM, but I don't think the support has been added to rust. Anoncreds however, with its dependency on Ursa, is compilable to WASM with this branch: https://github.com/blu3beri/anoncreds-rs/tree/wasm
It is however very experimental and not a lot of bindings.
thanks @blu3beri for the direction with anoncreds-rs you forked. I tried to clone and build it. ran: cargo build --release --lib --target=wasm32-unknown-unknown --verbose its failing with lots of errors looking like the below...
because of dependency on ursa, that depends openssl that dosent gets built to wasm32...
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.90/src/./aes.rs:3:24 |
3 | pub const AES_ENCRYPT: c_int = 1; | ^^^^^ not found in this scope |
---|
help: consider importing one of these items | 1 | use core::ffi::c_int; |
---|---|---|
1 | use std::ffi::c_int; | |
1 | use std::os::raw::c_int; | |
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.90/src/./aes.rs:4:24 |
4 | pub const AES_DECRYPT: c_int = 0; | ^^^^^ not found in this scope |
---|
help: consider importing one of these items | 1 | use core::ffi::c_int; |
---|---|---|
1 | use std::ffi::c_int; | |
1 | use std::os::raw::c_int; | |
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.90/src/./aes.rs:6:22 |
6 | pub const AES_MAXNR: c_int = 14; | ^^^^^ not found in this scope |
---|
help: consider importing one of these items | 1 | use core::ffi::c_int; |
---|---|---|
1 | use std::ffi::c_int; | |
1 | use std::os::raw::c_int; | |
Can you try: cargo build --release --lib --target=wasm32-unknown-unknown --verbose --no-default-features --features=wasm
?
Ursa does not always depend on openssl and has different dependencies when the portable_wasm
flag is used. In this branch it is made accessible.
the command you suggested didn't work , error: error: none of the selected packages contains these features: wasm
I removed the features=wasm and still same errors.... :(
It does contain the feature wasm as can be seen here: https://github.com/blu3beri/anoncreds-rs/blob/e835a0b5d40d487476512b3dfccbb56c97b5922c/Cargo.toml#L24
Thanks for all the help @blu3beri I ran command as you suggested, getting this error: error: none of the selected packages contains these features: wasm
on a clean git of anoncreds-rs, can you assume what am I doing wrong?
Thanks for all the help @blu3beri
I ran command as you suggested, getting this error:
error: none of the selected packages contains these features: wasm
on a clean git of anoncreds-rs, can you assume what am I doing wrong?
If you are on the correct branch "wasm" and run cargo build --release --no-default-features --features=wasm
it should work. The message above seems to me like you are on an incorrect branch as the "wasm" branch has that feature.
Thanks for all the help @blu3beri I ran command as you suggested, getting this error: error: none of the selected packages contains these features: wasm on a clean git of anoncreds-rs, can you assume what am I doing wrong?
If you are on the correct branch "wasm" and run
cargo build --release --no-default-features --features=wasm
it should work. The message above seems to me like you are on an incorrect branch as the "wasm" branch has that feature.
do you mean branch wasm of anoncreds?
~/projects/anoncreds-rs$ git branch
Thanks for all the help @blu3beri
I ran command as you suggested, getting this error:
error: none of the selected packages contains these features: wasm
on a clean git of anoncreds-rs, can you assume what am I doing wrong?
If you are on the correct branch "wasm" and run
cargo build --release --no-default-features --features=wasm
it should work. The message above seems to me like you are on an incorrect branch as the "wasm" branch has that feature.do you mean branch wasm of anoncreds?
~/projects/anoncreds-rs$ git branch
- main
~/projects/anoncreds-rs$ cargo build --release --no-default-features --features=wasm
error: none of the selected packages contains these features: wasm
My fork of anoncreds-rs, which I linked has a "wasm" branch.
there is an article that ursa is about to be replaced with Indy
https://hyperledger-indy.readthedocs.io/projects/hipe/en/latest/text/0034-ursa/README.html
when will that affect anoncreds? is it in the roadmap?