Open sunshowers opened 4 years ago
In addition to the Windows issues you mentioned, this crate is always no_std
, and therefore doesn't have access to either OsStr
or Path
at all.
It is probably best to implement this functionality in a small helper function outside of this crate. It should be relatively easy to write such a helper on top of Bump::alloc_slice_copy
.
Thanks. Feel free to close this issue then. Would it be worth documenting this somewhere?
Would it be worth documenting this somewhere?
this = "always no_std
" or something else?
If you end up writing a crate that adds this helper, I'm happy to link to it from the README as well!
this = "always no_std" or something else?
ahh, good question! both of those things I guess? that bumpalo is always no_std and that this + the Windows issues are why alloc_os_str
etc aren't present.
It would be very convenient to support allocating
OsStr
andPath
instances in aBump
.Unfortunately the underlying byte representation isn't exposed on Windows, so we'll probably have to return
Cow<'bump, OsStr>
orCow<'bump, Path>
which may defeat the purpose :(