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

Use rust-bitcoin feature instead of base64 dep #1

Open
RCasatta opened this issue Jul 28, 2021 · 5 comments
Open

Use rust-bitcoin feature instead of base64 dep #1

RCasatta opened this issue Jul 28, 2021 · 5 comments

Comments

@RCasatta
Copy link

base64 = "0.13.0"

rust-bitcoin has feature base64 adding the capability to create a PSBT from a base64 string and viceversa

@Kixunil
Copy link
Owner

Kixunil commented Jul 28, 2021

Ah, bitcoin docs sucks when it comes to features. Will look into it.

@Kixunil
Copy link
Owner

Kixunil commented Jul 29, 2021

Hmm, I'm not sure this is really that great idea. It saves a three lines of code but base64 is still transitive dependency of multiple crates, so now I have two base64 implementations.

@RCasatta
Copy link
Author

Hmm, I'm not sure this is really that great idea. It saves a three lines of code but base64 is still transitive dependency of multiple crates, so now I have two base64 implementations.

right, I see other deps depend on base64 v0.13.0 so yes better to not use base64 feature so it's used only one base64 implementation and wait for rust-bitcoin/rust-bitcoin#510 (comment)

apoelstra added a commit to rust-bitcoin/rust-bitcoin that referenced this issue Sep 14, 2021
95fb4e0 Document cargo features (Martin Habovstiak)

Pull request description:

  This documents cargo features in two ways: explictly in text and in code
  using `#[doc(cfg(...))]` attribute where possible. Notably, this is
  impossible for `serde` derives. The attribute is contitional and only
  activated for docs.rs or explicit local builds.

  This change also adds `package.metadata.docs.rs` field to `Cargo.toml`
  which instructs docs.rs to build with relevant features and with
  `docsrs` config activated enabling `#[doc(cfg(...))] attributes.

  I also took the opportunity to fix a few missing spaces in nearby code.

  Notes for reviewers:

  * To build and look at result locally run: `RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features std,secp-recovery,base64,rand,use-serde,bitcoinconsensus --open` (don't confuse `RUSTDOCFLAGS` with `RUSTFLAGS` - took me a while to figure that out 😞)
  * You should see needed features being called out - e.g. in `Script::verify`
  * More information and some screenshots: rust-lang/cargo#8103 (comment)
  * For an example why this matters see: Kixunil/loptos#1 😉
  * Serde issue: serde-rs/serde#2063

ACKs for top commit:
  dr-orlovsky:
    ACK 95fb4e0
  apoelstra:
    ACK 95fb4e0

Tree-SHA512: 4d6428bfa05cbeb2d8737f0239aa1836b5f36f4b040e1ac5e0862663c4ea783711d122182dd8313913fd593ab224915bd8def5e268b272215bee2c9856a27674
@DanGould
Copy link

DanGould commented Jan 1, 2023

Is using rust-bitcoin base64 feature ok now since rust-bitcoin/rust-bitcoin#510 (comment) 510 is closed?

@Kixunil
Copy link
Owner

Kixunil commented Jan 2, 2023

Oh, yeah, thanks for heads up!

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

No branches or pull requests

3 participants