Comments (16)
@fredfortier I submitted a PR. If you'd like you can test it out on my branch or wait for it to come into develop
from libsecp256k1.
You did it @trevor-crypto . Your branch referenced above is now working for me when compiling to my no_std target.
from libsecp256k1.
Same issue here. Here's what cargo nono
says:
libsecp256k1: FAILURE
- Did not find a #![no_std] attribute or a simple conditional attribute like #[cfg_attr(not(feature = "std"), no_std)] in the crate source. Crate most likely doesn't support no_std without changes.
log: FAILURE
from libsecp256k1.
bump
from libsecp256k1.
Doing some investigation because I would like to move this forward as well.
I believe the issue came from the changes in #41 which make use of allocation (Vec
and Box
)
Would like to know what everyone else thinks. At first glance, it does not seem possible to feature-gate behind feature = "std"
because the functions are used in the generators used in build.rs
Related: #46
from libsecp256k1.
#75 should resolve this issue, which is in 0.6.0
from libsecp256k1.
I am experiencing this issue in 0.6.0 with:
libsecp256k1 = { version="0.6.0", default-features=false, features=["static-context"] }
std duplicate method exceptions are thrown noting:
the lang item is first defined in crate `std` (which `libsecp256k1_core` depends on)
from libsecp256k1.
@samkirton that's strange...I just tried again with static-context
and could not reproduce this. Do you have another crate in your dependencies that is possibly enabling std
for libsecp256k1_core
?
from libsecp256k1.
The only other dependencies I have are:
rand = { version="0.7.3", optional = true }
sha2 = { version="0.9.5", default-features=false }
[features]
signing = ["rand", "libsecp256k1/hmac"]
where rand is turned on only for the signing feature
from libsecp256k1.
@samkirton I still can't reproduce your exact error message above, but I can reproduce a similar one when I use rand
as you have in your dependencies. You might need to turn off default-features for rand
if you're using no_std when the signing
feature is enabled.
from libsecp256k1.
Signing requires hmac, which requires std, so rand is only ever used for std builds. I will try and disable default features on rand though just incase optional = true
isn't working as I expected it to
from libsecp256k1.
Signing requires hmac, which requires std, so rand is only ever used for std builds.
Oh right, sorry.
from libsecp256k1.
@trevor-crypto I just tried to upgrade to 0.6.0 from 0.3.5 and getting std dependencies again. I guess it's expected based on your note above:
Signing requires hmac, which requires std, so rand is only ever used for std builds.
Does this mean that this crate no longer support signing with no_std? There must be a no_std version of hmac because 0.3.5 is depending on one.
from libsecp256k1.
I tried using the blank_with_context
variants thinking that the static-context
feature may have been the problem but it's not.
This dependency alone pulls in the std:
libsecp256k1 = { version = "0.6.0", default-features = false, features = [
"hmac"
] }
It would be great (or rather necessary) to have no_std signing feature like in earlier versions. My only known option is to downgrade to 0.3.5 which I'll have to patch because some of its dependencies are no longer on crates_io.
from libsecp256k1.
I'm confused about this issue as well because cargo nono check
gives the dependency above (with only the hmac feature) a clear report, but the compiler gives an std error when I use it. I'll try your branch.
from libsecp256k1.
This should be fixed now. Let me know if the error still exists.
from libsecp256k1.
Related Issues (20)
- remove alloc to support no_std targets without global allocators
- Maintaining a CHANGLOG file
- needless panic during deserialization? HOT 1
- Consider renaming the crate
- Lack of documentation for SharedSecret generation. HOT 1
- The Compilation In Mac M1 is Failing because some missing config after updating rustler to 0.24 0r 0.25
- Please push release tags HOT 1
- About link is 404 HOT 2
- Un-released changes
- Support zeroization / clearing of secrets from memory
- It can't build to wasm HOT 3
- What is the meaning of "group element not on the curve" HOT 1
- Update Digest dependency
- Please support Scalar comparision
- Not able to compile code with solana & exceed computation units error while calling verify function HOT 1
- Ensure proper memory clean-up for secrets
- Unable to build - Compile error HOT 10
- How to perform add/mult operation? HOT 1
- Bincode Serialization Broken For PublicKey
- rustc error due to arrayref dependency HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsecp256k1.