Skip to content

Commit

Permalink
units: Prepare the 1.0-alpha.0 release
Browse files Browse the repository at this point in the history
The `amounts` module is not yet done but we do not have to wait. We
can use `doc(hidden)` to hide the `amount` module and hence only
include stuff that is stable.
  • Loading branch information
tcharding committed Feb 26, 2025
1 parent aebda6e commit 93f8669
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ dependencies = [

[[package]]
name = "bitcoin-units"
version = "0.2.0"
version = "1.0.0-alpha.0"
dependencies = [
"arbitrary",
"bincode",
Expand Down
2 changes: 1 addition & 1 deletion Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies = [

[[package]]
name = "bitcoin-units"
version = "0.2.0"
version = "1.0.0-alpha.0"
dependencies = [
"arbitrary",
"bincode",
Expand Down
2 changes: 1 addition & 1 deletion bitcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internals = { package = "bitcoin-internals", version = "0.4.0", features = ["all
io = { package = "bitcoin-io", version = "0.2.0", default-features = false, features = ["alloc", "hashes"] }
primitives = { package = "bitcoin-primitives", version = "0.101.0", default-features = false, features = ["alloc"] }
secp256k1 = { version = "0.29.0", default-features = false, features = ["hashes", "alloc"] }
units = { package = "bitcoin-units", version = "0.2.0", default-features = false, features = ["alloc"] }
units = { package = "bitcoin-units", version = "1.0.0-alpha.0", default-features = false, features = ["alloc"] }

arbitrary = { version = "1.4", optional = true }
base64 = { version = "0.22.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ arbitrary = ["dep:arbitrary", "units/arbitrary"]
hashes = { package = "bitcoin_hashes", version = "0.16.0", default-features = false, features = ["hex"] }
hex = { package = "hex-conservative", version = "0.3.0", default-features = false }
internals = { package = "bitcoin-internals", version = "0.4.0" }
units = { package = "bitcoin-units", version = "0.2.0", default-features = false }
units = { package = "bitcoin-units", version = "1.0.0-alpha.0", default-features = false }

arbitrary = { version = "1.4", optional = true }
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"], optional = true }
Expand Down
33 changes: 28 additions & 5 deletions units/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
# Unreleased

- TODO: Make a comment about `Amount::MAX_MONEY` including breaking serde

- Use MAX_MONEY in serde regression test [#3950](https://github.com/rust-bitcoin/rust-bitcoin/pull/3950)
# 1.0.0-alpha - 2025-02-24

Release everything except the `amount` types.

BOOM! A long time in the making but here goes, our first alpha 1.0 crate release.

* Add `FIFTY_BTC` const to the amount types [#3915](https://github.com/rust-bitcoin/rust-bitcoin/pull/3915)
* Remove `InputString` from the public API [#3905](https://github.com/rust-bitcoin/rust-bitcoin/pull/)
* Hide the remaining public macros [#3867]()
* Introduce an unchecked constructor for the `Amount` type [#3811]()
* Implement `Arbitrary` for `units` types [#3777]()
* Change method return type for `to_unsigned()` [#3769]()
* Change paramater type used for whole bitcoin [#3744]()
* Add `Weight::to_kwu_ceil` [#3740]()
* Change `SignedAmount` MAX and MIN to equal +/- MAX_MONEY [#3719]()
* Change `Amount::MAX` from `u64::MAX` to `Amount::MAX_MONEY` [#3693]()
* Support serde serializing `Amount` as string [#3679]()
* Close amounts error types [#3674]()
* Close the hex parse errors [#3673]()
* Remove `serde` from amounts [#3672]()
* Implement `serde` modules for `FeeRate` [#3666]()
* Remove `Amount::fmt_value_in` [#3621]()
* Split `checked_div_by_weight` into floor and ceiling version [#3587]()
* Replace `String` with `InputString` [#3559]()
* Add checked div by weight to amount [#3430]()
* Add `FeeRate` addition and subtraction traits [#3381]()
* Add `Arbitrary` to `SignedAmount` type [#3274]()
* Add `Arbitrary` to `Weight` [#3257]()

# 0.2.0 - 2024-09-18

Expand Down
2 changes: 1 addition & 1 deletion units/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitcoin-units"
version = "0.2.0"
version = "1.0.0-alpha.0"
authors = ["Andrew Poelstra <[email protected]>"]
license = "CC0-1.0"
repository = "https://github.com/rust-bitcoin/rust-bitcoin/"
Expand Down
4 changes: 3 additions & 1 deletion units/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub mod _export {
}
}

#[doc(hidden)]
pub mod amount;
pub mod block;
pub mod fee_rate;
Expand All @@ -39,8 +40,9 @@ pub mod weight;
#[doc(inline)]
#[rustfmt::skip]
pub use self::{
amount::{Amount, SignedAmount},
block::{BlockHeight, BlockInterval},
fee_rate::FeeRate,
weight::Weight
};
#[doc(hidden)]
pub use self::amount::{Amount, SignedAmount};

0 comments on commit 93f8669

Please sign in to comment.