upvote
For the same reason the V8 team bothered to set up a 32-bit addressing scheme for the GC heap even on 64-bit platforms, I imagine? The bytes add up when there’s enough of them.
reply
> It doesn't enforce the Rust rule that strings must be strict UTF-8

Judging by the name, nor should it, because OS-paths aren't always UTF-8. See for example the rust standard library type OsString https://doc.rust-lang.org/std/ffi/struct.OsString.html

The rust std library string is a reasonable default, but it's not always the right choice. Lots of projects use different things for good reasons.

reply
deleted
reply