2021-05-15 15:12:27 +00:00
|
|
|
[package]
|
2022-09-16 01:52:57 +00:00
|
|
|
authors = ["Riccardo Casatta <riccardo@casatta.it>"]
|
2023-11-14 22:14:56 +00:00
|
|
|
edition = "2021"
|
2021-05-15 15:12:27 +00:00
|
|
|
readme = "README.md"
|
|
|
|
name = "embedded"
|
|
|
|
version = "0.1.0"
|
|
|
|
|
2022-09-16 01:52:57 +00:00
|
|
|
# Prevent this from interfering with workspaces
|
|
|
|
[workspace]
|
|
|
|
members = ["."]
|
|
|
|
|
|
|
|
[features]
|
|
|
|
alloc = ["alloc-cortex-m", "bitcoin_hashes/alloc"]
|
|
|
|
|
2021-05-15 15:12:27 +00:00
|
|
|
[dependencies]
|
|
|
|
cortex-m = "0.6.0"
|
|
|
|
cortex-m-rt = "0.6.10"
|
|
|
|
cortex-m-semihosting = "0.3.3"
|
|
|
|
panic-halt = "0.2.0"
|
2022-09-16 01:52:57 +00:00
|
|
|
alloc-cortex-m = { version = "0.4.1", optional = true }
|
2023-11-06 19:22:43 +00:00
|
|
|
bitcoin_hashes = { path="../", default-features = false, features = ["io"] }
|
Add a `bitcoin_io` crate
In order to support standard (de)serialization of structs, the
`rust-bitcoin` ecosystem uses the standard `std::io::{Read,Write}`
traits. This works great for environments with `std`, however sadly
the `std::io` module has not yet been added to the `core` crate.
Thus, in `no-std`, the `rust-bitcoin` ecosystem has historically
used the `core2` crate to provide copies of the `std::io` module
without any major dependencies. Sadly, its one dependency,
`memchr`, recently broke our MSRV.
Worse, because we didn't want to take on any excess dependencies
for `std` builds, `rust-bitcoin` has had to have
mutually-exclusive `std` and `no-std` builds. This breaks general
assumptions about how features work in Rust, causing substantial
pain for applications far downstream of `rust-bitcoin` crates.
Here, we add a new `bitcoin_io` crate, making it an unconditional
dependency and using its `io` module in the in-repository crates
in place of `std::io` and `core2::io`. As it is not substantial
additional code, the `hashes` io implementations are no longer
feature-gated.
This doesn't actually accomplish anything on its own, only adding
the new crate which still depends on `core2`.
2023-10-04 05:51:26 +00:00
|
|
|
bitcoin-io = { path = "../../io", default_features = false }
|
2021-05-15 15:12:27 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "embedded"
|
|
|
|
test = false
|
|
|
|
bench = false
|
|
|
|
|
|
|
|
[profile.release]
|
|
|
|
codegen-units = 1 # better optimizations
|
|
|
|
debug = true # symbols are nice and they don't increase the size on Flash
|
|
|
|
lto = true # better optimizations
|
2023-06-27 23:25:21 +00:00
|
|
|
|
|
|
|
[patch.crates-io.bitcoin-internals]
|
|
|
|
path = "../../internals"
|
Add a `bitcoin_io` crate
In order to support standard (de)serialization of structs, the
`rust-bitcoin` ecosystem uses the standard `std::io::{Read,Write}`
traits. This works great for environments with `std`, however sadly
the `std::io` module has not yet been added to the `core` crate.
Thus, in `no-std`, the `rust-bitcoin` ecosystem has historically
used the `core2` crate to provide copies of the `std::io` module
without any major dependencies. Sadly, its one dependency,
`memchr`, recently broke our MSRV.
Worse, because we didn't want to take on any excess dependencies
for `std` builds, `rust-bitcoin` has had to have
mutually-exclusive `std` and `no-std` builds. This breaks general
assumptions about how features work in Rust, causing substantial
pain for applications far downstream of `rust-bitcoin` crates.
Here, we add a new `bitcoin_io` crate, making it an unconditional
dependency and using its `io` module in the in-repository crates
in place of `std::io` and `core2::io`. As it is not substantial
additional code, the `hashes` io implementations are no longer
feature-gated.
This doesn't actually accomplish anything on its own, only adding
the new crate which still depends on `core2`.
2023-10-04 05:51:26 +00:00
|
|
|
|
|
|
|
[patch.crates-io.bitcoin-io]
|
|
|
|
path = "../../io"
|
2023-08-08 08:47:05 +00:00
|
|
|
|
|
|
|
[patch.crates-io.bitcoin-units]
|
|
|
|
path = "../../units"
|