ockam
ockam copied to clipboard
Remove unnecessary `core`/`heapless`/`hashbrown` re-exports from `signature_core::lib`
The signature_core
crate has a couple issues related to import/exports:
-
First, it should just be unconditionally
no_std
. It doesn't declare any features, but has https://github.com/ockam-network/ockam/blob/cc93b3863df2f8343c824ace8b30041bae2fa8f2/implementations/rust/ockam/signature_core/src/lib.rs#L11-L17, so this could just be#![no_std]
without anyextern crate core
orextern crate alloc
. -
It has this fairly dubious
mod lib
, which gets used by the othersignature_*
crates too: https://github.com/ockam-network/ockam/blob/cc93b3863df2f8343c824ace8b30041bae2fa8f2/implementations/rust/ockam/signature_core/src/lib.rs#L56-L85I think for the most part everything here should be depended on more directly at the place of usage. This applies especially to the imports from
core
,heapless
, and especially to the re-export ofhashbrown
(which makes this code requireliballoc
when it wouldn't otherwise need one). After removing this, I guess it's a bit like aprelude
module, perhaps.
So, I think we should:
-
Fix the no_std issue mentioned above for
signature_core
(problem 1), and while we're at it, check the othersignature_*
crates and see if they have the same issue. -
Remove all the
core
,heapless
, andhashbrown
reexports fromsignature_core::lib
. Crates which were using these should import/depend on them directly. The comment forsignature_core
should change to just say that it's shared functionality used by the other signature crates, or something. -
Remove
hashbrown
fromsignature_core
's Cargo.toml, since at least that crate doesn't actually need it, (AFAIK).
Hello 👋🏾 . I made the changes, about point number 2, changing the crates that are using the exports, would love some help with that.
I am getting this error in the /signature_bbs_plus/examples/readme-source.rs file extern location for signature_bbs_plus does not exist: /home/jim_4067/Documents/osca/ockam/target/rls/debug/deps/libsignature_bbs_plus-0473ec9102419dda.rmetarustc
The signature_core
crate doesn't exist anymore, so I'm closing this issue.