-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no_std support #205
Comments
rust-bitcoin/rust-bitcoin#603 added |
Small update
To the BDK teamThere are 2 main approaches to implementing Using The second approach is to use the The main downside that from using |
Thanks for the |
I would first give it a shot with the core approach and see what happens. If it turns out to be too messy we can try with something else, but ideally I would avoid extra dependencies and I would try to stay aligned with the rest of the rust-bitcoin environment.
I'm assuming most hardware devices won't have permanent storage for UTXOs, so it's probably fine to release with just the |
I am writing about this for the blog post which should drop this week but here's my current vision on how this would work with
So |
I like this approach, makes sense to me. |
ac16e05 Add no_std support (mcroad) Pull request description: Closes #201. Related to bitcoindevkit/bdk#205 Not ready. - [x] `no_std` example - [x] updated readme with instructions - [x] tests pass - [x] rust-bitcoin/rust-bitcoin#637 includes `secp256k1/alloc` feature in `bitcoin/no-std`. Released on `0.28.0` - [x] rust-bitcoin/rust-bitcoin#690 Rust `1.47` set as `no_std` MSRV. Released in `0.28.1`. Maintains backward compatibility. To use it in a `no_std` context set `default-features = false` and enable the `no-std` feature. ~~To the maintainers: I added the `no-std-compat` crate. It wraps `core` and `hashbrown` and makes them look like `std`. This is a different than what `rust-bitcoin` did. They use `core` and `hashbrown` directly. I believe using `no-std-compat` makes the code more readable. I'd like to hear your thoughts on this.~~ Now using `hashbrown` and `core` directly. ACKs for top commit: sanket1729: ACK ac16e05 Tree-SHA512: 5c26cb50374b7844acbcc5a7607f5710ce19ec0aff4caed1346ed4a2fb708a909205a7d87cc27a773624f43b2a99a71c3ba4bb1cdf2dfec0584833df00b9f032
|
Here's another request from @BitcoinComfy for no_std support and to be able to create a static build for twitter thread: https://twitter.com/BitcoinComfy/status/1611332656570191873 |
Making slow progress on this. I immediately noticed just how big BDK is, especially for embedded devices. Safe to say |
FWIW I have made it |
Hardware wallets should be able to use BDK.
This will need to happen in a few steps:
I have an ugly prototype for rust-bitcoin using bare-io to polyfill
std::io
stuff that's missing fromno_std
. Going to make a draft PR shortly and get some feedback.The text was updated successfully, but these errors were encountered: