TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Libc in LLVM

23 pointsby akalinalmost 6 years ago

3 comments

writepubalmost 6 years ago
A 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.<p>There&#x27;s much argument to be made to use the OS specific libc, but that is <i>only</i> 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
g82918almost 6 years ago
At 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.
georgelyonalmost 6 years ago
Another 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!