chipsenkbeil / typed-path

Provides typed variants of Path and PathBuf for Unix and Windows
38 stars 6 forks source link

Add no_std support #18

Closed h33p closed 10 months ago

h33p commented 11 months ago

Hey there, wonderful crate!

I'm trying to build filesystem abstractions that do not depend on the standard library (i.e. could be embedded into no_std kernel and alike), and std::path::Path(Buf) strictly depend on existence of standard library. Funnily enough, there don't seem to be any no_std path implementations. However, this crate seems like a good candidate, because it does not merely wrap path objects, but reimplements them!

This PR divorces the codebase from std, and only makes it depend on alloc, with optional dependency to std. I suppose alloc could be void too if one were to feature gate PathBuf, but I don't think it's worth to do it all in one go (or at all).

Please let me know what you think, whether this seems like a reasonable change, and if there are any changes you'd like to see.

chipsenkbeil commented 11 months ago

@h33p hey there, thanks for the PR! Gave it a quick skim and it looks fine to me. Have no issue with merging this in to support no_std. Letting tests run, and once they pass I'll merge this in.

h33p commented 11 months ago

@h33p hey there, thanks for the PR! Gave it a quick skim and it looks fine to me. Have no issue with merging this in to support no_std. Letting tests run, and once they pass I'll merge this in.

Wonderful! I noticed there was a typo in the workflow making lints not fully work. Now it's fixed.

chipsenkbeil commented 11 months ago

@h33p oh, and would you mind updating the changelog to reflect your changes?

h33p commented 10 months ago

@h33p oh, and would you mind updating the changelog to reflect your changes?

Done

chipsenkbeil commented 10 months ago

@h33p your feature is now incorporated into release 0.7.0. I didn't update the readme to reflect support for it (forgot), so we can do that in a later change.