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

support io (read/write) without core #98

Merged
merged 1 commit into from
Oct 29, 2021
Merged

support io (read/write) without core #98

merged 1 commit into from
Oct 29, 2021

Conversation

Stebalien
Copy link
Member

This:

  1. Uses core2 when std isn't supported.
  2. Adds an alloc feature for building with and without the alloc crate.

Uses multiformats/rust-multihash#146.

Unfortunately, we can't do multibase formatting yet due to multiformats/rust-multibase#33. But we can fix that later.

This:

1. Uses core2 when std isn't supported.
2. Adds an alloc feature for building with and without the alloc crate.

Uses multiformats/rust-multihash#146.

Unfortunately, we can't do multibase formatting yet due to
multiformats/rust-multibase#33. But we can fix
that later.
Copy link

@samuelburnham samuelburnham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

pub fn to_bytes(&self) -> Vec<u8> {
let mut bytes = vec![];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to add #![cfg_attr(feature = "alloc", macro_use)] to lib.rs and keep this? It seems fine either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's easier to just use the constructor. Honestly, the macro was mostly useful as an efficient way to allocate vectors with a slice-like syntax before const generics.

@Stebalien Stebalien changed the base branch from master to next October 29, 2021 15:09
@Stebalien Stebalien merged commit 57c7d15 into next Oct 29, 2021
@Stebalien
Copy link
Member Author

Merged into the branch "next". I'll merge that into master when we're ready to release both this and mutlihash.

@Stebalien Stebalien deleted the feat/core-io branch October 29, 2021 15:09
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

Successfully merging this pull request may close these issues.

3 participants