| ▲ | Animats 2 hours ago | |
The module with the code mentioned is at [1] This is awful. They have some internal string format borrowed from a Zig library where the address of the item is in the low end of a pointer and the length is at the high end. Why are they doing that in 2026? It lets you save a few bytes at best. It doesn't enforce the Rust rule that strings must be strict UTF-8. It's totally alien to the safe way Rust handles strings. [1] https://github.com/oven-sh/bun/blob/main/src/bun_core/string... | ||
| ▲ | gpm 9 minutes ago | parent | next [-] | |
> 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. | ||
| ▲ | mananaysiempre 2 hours ago | parent | prev | next [-] | |
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. | ||
| ▲ | 2 hours ago | parent | prev [-] | |
| [deleted] | ||