Commit Graph

4 Commits

Author SHA1 Message Date
Tobin C. Harding d9cc724187
Bump MSRV to Rust version 1.56.1
Rust version 1.56.0 introduced edition 2021. Shortly afterwards, on
October 21 2021 Rust version 1.56.1 was released.

Debian stable is currently shipping `rustc 1.63.0`.

Our stated MSRV policy is: In Debian stable and at least 2 years old.

Therefore our MSRV policy is met by Rust version 1.56.1 and we can strat
to bump our MSRV org wide.

Start by bumping the `rust-bitcoin` and `hashes` MSRV to Rust 1.56.1,
includes:

- Update docs.
- Update CI and remove pinning.
- Update the build files and remove now stale cfg attributes rust_v_1_x
  for values less than the new MSRV.
- Use new `IntoIterator` for arrays so we no longer need to allocate a
  vector to iterate.

Links:

- https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html
- https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html
- https://packages.debian.org/stable/rust/rustc
2023-11-23 06:20:02 +11:00
yancy fde6479c6a Create uniform build script
Previously, each unique compiler cfg attribute that appeared in the
codebase was hard coded and emitted to stdout at compile time. This
meant keeping the file up to date as different compiler cfg attributes
changed. It's inconsequential to emit a compiler version that's not
used, so this change just emits all possibilities to reduce the
maintenance burden of the build script.
2023-10-30 14:40:41 +01:00
Martin Habovstiak 2b6bcf085c Implement support for `alloc`-free parse errors
This implements basic facilities to conditionally carry string inputs in
parse errors. This includes:

* `InputString` type that may carry the input and format it
* `parse_error_type!` macro creating a special type for parse errors
* `impl_parse` implementing parsing for various types as well as its
  `serde`-supporting alternative
2023-06-04 21:15:37 +02:00
Martin Habovstiak 6fc4860813 Activate `rust_v_1_46` when on high-enough rustc
This adds a build script that automatically activates the cfg if the
version is sufficient. We don't make API changes here, just improve
debugging by enabling `track_caller`.
2022-09-14 08:55:02 +02:00