Skip to content
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

units: Make amount module not require "alloc" feature #2389

Closed
tcharding opened this issue Jan 23, 2024 · 2 comments · Fixed by #2408
Closed

units: Make amount module not require "alloc" feature #2389

tcharding opened this issue Jan 23, 2024 · 2 comments · Fixed by #2408
Labels
1.0 Issues and PRs required or helping to stabilize the API C-units PRs modifying the units crate

Comments

@tcharding
Copy link
Member

tcharding commented Jan 23, 2024

The amount module has loads of string parsing and heavily relies on types from allloc, however there may be no-std users that would still like to have an Amount type. It should be feasible to make the feature gating more fine grained so we can provide an Amount type in "no-std" builds.

@Kixunil
Copy link
Collaborator

Kixunil commented Jan 23, 2024

I thought this is done already? Anyway, can look into it after #2370 merges.

@tcharding
Copy link
Member Author

The whole amount module is feature gated on "alloc"

// TODO: Make amount module less dependent on an allocator.
#[cfg(feature = "alloc")]
pub mod amount;

tcharding added a commit to tcharding/rust-bitcoin that referenced this issue Jan 25, 2024
Remove the TODO and add an issue:

  rust-bitcoin#2389
@Kixunil Kixunil added 1.0 Issues and PRs required or helping to stabilize the API C-units PRs modifying the units crate labels Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Issues and PRs required or helping to stabilize the API C-units PRs modifying the units crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants