4 ms·
A Libc in LLVM
- georgelyon 7y agoAnother interesting tack would be to include trivial functions like strlen, memcpy and friends with LLVM (excluding, at least initially, things like sockets). This would help a ton with WebAssembly as we wait for all browsers to support WASI!
- writepub 7y agoA cross-platform libc included with LLVM is much needed! Languages like Go, Rust, .. already abstract away arch and OS details, while one of the oldest high-level languages, C is still battling this fundamental requirement. There's much argument to be made to use the OS specific libc, but that is only for OS specific tasks (ioctl, specific syscalls, etc). If we can make a cross platform libc that implements and abstracts aways the 200 most commonly used syscallc on Linux, I believe 95% of user programs will just work across all OS-es
- g82918 7y agoAt some point it would be nice if some large organization would move us past libc. Printf and kin are a nightmare. Really we need a more rigorously vetted set of functions. Something typesafe would be nice and having a c++ version would be great, imagine a memcpy that works with std::array natively.