Skip to content

Migrate FeeRate to procedural macros#693

Merged
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:feature/macros-2
Mar 25, 2025
Merged

Migrate FeeRate to procedural macros#693
thunderbiscuit merged 1 commit intobitcoindevkit:masterfrom
thunderbiscuit:feature/macros-2

Conversation

@thunderbiscuit
Copy link
Copy Markdown
Member

@thunderbiscuit thunderbiscuit commented Mar 11, 2025

This PR simply migrates the FeeRate type to procedural macros. Notice that because it is used in the UDL more places than simply its definition, we must keep a single line indicating its definition in proc macros.

These lines can be removed once no reference to the FeeRate type are required in the UDL (for example once we migrate the Wallet type).

I also fixed here the arguments to both constructors of the FeeRate type to bring them in line with the Rust API.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Comment thread bdk-ffi/src/bdk.udl
f64 to_btc();
};

interface FeeRate {
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.

Should we have sort of policy when migrating to proc macros, if a type did not have documentation defined, a second commit introduces docs too? Seems like a good opportunity to get those out of the way

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think that's a great idea.

Copy link
Copy Markdown
Collaborator

@reez reez left a comment

Choose a reason for hiding this comment

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

ACK 5fd3c71

Just add docs in bitcoin.rs as planned before merge

@thunderbiscuit thunderbiscuit merged commit 74761d0 into bitcoindevkit:master Mar 25, 2025
26 checks passed
@thunderbiscuit thunderbiscuit deleted the feature/macros-2 branch March 25, 2025 00:27
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.

3 participants