Skip to content

no-std cleanup#637

Merged
dr-orlovsky merged 2 commits intorust-bitcoin:masterfrom
devrandom:2021-08-no-std-cleanup
Nov 12, 2021
Merged

no-std cleanup#637
dr-orlovsky merged 2 commits intorust-bitcoin:masterfrom
devrandom:2021-08-no-std-cleanup

Conversation

@devrandom
Copy link
Copy Markdown
Contributor

dr-orlovsky
dr-orlovsky previously approved these changes Aug 2, 2021
Cargo.toml Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little puzzled why it's needed now or how it was working without this?

Copy link
Copy Markdown
Contributor Author

@devrandom devrandom Aug 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked because we are not creating contexts in bitcoin itself via Secp256k1::new.

However, since we are re-exporting secp256k1, and depending crates (such as lightning) do want to create contexts, it's much nicer to pull this feature in, so they don't have to declare the dependency on secp256k1 themselves, just in order to add the feature.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks

Kixunil
Kixunil previously approved these changes Aug 2, 2021
@devrandom
Copy link
Copy Markdown
Contributor Author

Apologies, this makes the embedded test fail. Will look into it tomorrow.

@devrandom devrandom dismissed stale reviews from Kixunil and dr-orlovsky via 849ec3f August 2, 2021 20:09
@devrandom devrandom force-pushed the 2021-08-no-std-cleanup branch from 004fe49 to 849ec3f Compare August 2, 2021 20:09
@devrandom
Copy link
Copy Markdown
Contributor Author

Actually, the embedded test is fixed now, please take another look.

Copy link
Copy Markdown
Collaborator

@dr-orlovsky dr-orlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Actually there is a companion PR in secp256k1 rust-bitcoin/rust-secp256k1#314 which also fixes bug related to the feature use - no idea how we got no_std working without it

@dr-orlovsky dr-orlovsky added this to the 0.28.0 milestone Aug 9, 2021
@dr-orlovsky dr-orlovsky added the minor API Change This PR should get a minor version bump label Aug 9, 2021
@GeneFerneau
Copy link
Copy Markdown

utACK 849ec3f

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 849ec3f

(I did actually run my local tests on it but I don't think they cover anything embedded related.)

@Kixunil
Copy link
Copy Markdown
Collaborator

Kixunil commented Jan 17, 2022

Why does this have label Minor API change? I don't see any API change.

@dr-orlovsky
Copy link
Copy Markdown
Collaborator

It was probably my mistake (I thought that it is either major or minor API change, it can't be none)

@dr-orlovsky dr-orlovsky removed the minor API Change This PR should get a minor version bump label Jan 17, 2022
sanket1729 added a commit to rust-bitcoin/rust-miniscript that referenced this pull request Jun 5, 2022
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
yancyribbens pushed a commit to yancyribbens/rust-bitcoin that referenced this pull request Mar 23, 2024
Adds a `since=10.0.0` to all `max_satisfaction_weight` deprecations.
Adds a note telling users to check rust-bitcoin#476 for more details.

Closes rust-bitcoin#637.
yancyribbens pushed a commit to yancyribbens/rust-bitcoin that referenced this pull request Mar 23, 2024
…ax_satisfaction_weight`

7fc7661 Deprecate across the board max_satisfaction_weight (Jose Storopoli)

Pull request description:

  Adds a `since=10.0.0` to all `max_satisfaction_weight` deprecations. Adds a note telling users to check rust-bitcoin#476 for more details.

  Closes rust-bitcoin#637.

ACKs for top commit:
  apoelstra:
    ACK 7fc7661
  tcharding:
    ACK 7fc7661

Tree-SHA512: 90a75bd44d5b0bec5044fc58186323f6c992e43958a912d9d36a1bda411ef6156076ac2125ee6dc8806a742b0aef046ae1f540911301972c8c2f95bb02ec8980
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
ac16e05aa9943152e4235b490fd4ad03a496a7c1 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 ac16e05aa9943152e4235b490fd4ad03a496a7c1

Tree-SHA512: 5c26cb50374b7844acbcc5a7607f5710ce19ec0aff4caed1346ed4a2fb708a909205a7d87cc27a773624f43b2a99a71c3ba4bb1cdf2dfec0584833df00b9f032
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants