Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Use alloc and core crates where they are applicable #331

Merged
merged 3 commits into from
Aug 25, 2020

Conversation

c410-f3r
Copy link
Contributor

First step towards no_std compatibility for unixfs

@ljedrz
Copy link
Member

ljedrz commented Aug 22, 2020

Cc #247.

Making it no_std is not going to be simple, but we're still pursuing this, right? Other than that this looks fine, I'd just amend the first commit message so that it specifies that this applies only to the unixfs module.

@ljedrz
Copy link
Member

ljedrz commented Aug 22, 2020

As a side note, another thing that can be done to further this effort would be e.g. to use the alloc crate to replace e.g. std::borrow::Cow with alloc::borrow::Cow etc.

@c410-f3r
Copy link
Contributor Author

c410-f3r commented Aug 23, 2020

As a side note, another thing that can be done to further this effort would be e.g. to use the alloc crate to replace e.g. std::borrow::Cow with alloc::borrow::Cow etc.

The plan is to create incremental steps towards no_std instead of making everything at once like in #282

@c410-f3r c410-f3r changed the title Use core crate where is applicable Use alloc and core crates where is applicable Aug 24, 2020
@c410-f3r c410-f3r changed the title Use alloc and core crates where is applicable Use alloc and core crates where they are applicable Aug 24, 2020
Copy link
Collaborator

@koivunej koivunej left a comment

Choose a reason for hiding this comment

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

This is looking good, apologies for the delay.

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 25, 2020

Build succeeded:

@bors bors bot merged commit 55af3d2 into rs-ipfs:master Aug 25, 2020
Comment on lines +4 to -8
use core::borrow::Borrow;
use core::fmt;
use core::ops::Range;
use futures::stream::Stream;
use ipfs_unixfs::file::{visit::IdleFileVisit, FileReadFailed};
use std::borrow::Borrow;
use std::fmt;
use std::ops::Range;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just noticed while handling local conflicts that these were probably extra. ipfs should not attempt to be no_std at this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, the ipfs crate deals with input and output operations that are tied to the underlying OS

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants