5 ms·
So what we need is essentially a "libc virtualization". But Musl is only available on Linux, isn't it? Cosmopolitan (https://github.com/jart/cosmopolitan https
by Rochus 9mo ago
So what we need is essentially a "libc virtualization".
But Musl is only available on Linux, isn't it? Cosmopolitan (https://github.com/jart/cosmopolitan https://github.com/jart/cosmopolitan) goes further and is available also on Mac and Windows, and it uses e.g. SIMD and other performance related improvements. Unfortunately, one has to cut through the marketing "magic" to find the main engineering value; stripping away the "polyglot" shell-script hacks and the "Actually Portable Executable" container (which are undoubtedly innovative), the core benefit proposition of Cosmopolitan is indeed a platform-agnostic, statically-linked C standard (plus some Posix) library that performs runtime system call translation, so to say "the Musl we have been waiting for".
- sidewndr46 9mo agoAt the rate things are going we'll need a container virtualization layer as well, a docker for docker if you know what I mean
- miduil 9mo agoDo you mean something like gVisor?
- rafale 9mo ago"All problems in computer science can be solved by another level of indirection"
- binsquare 9mo agoI'm building in this space, I take a docker inside a microvm (vm-lite) approach. https://github.com/smol-machines/smolvm https://github.com/smol-machines/smolvm
- cwillu 9mo agoAnd the cycle continues
- binsquare 9mo agoIt's just fun ;)
- sidewndr46 9mo agoI wonder if inside the docker container we can run a sandboxed WASM runtime?
- VikingCoder 9mo agoI desperately want to write C/C++ code that has a web server and can talk websockets, and that I can compile with Cosmopolitan. I don't want Lua. Using Lua is crazy clever, but it's not what I want. I should just vibe code the dang thing.
- tgittos 9mo agoYou should, it’s fun. I have a devcontainer running the Cosmopolitan toolchain and stuck the cosmocc README.md in a file referenced from my AGENTS.md. Claude does a decent job. You have to stay on top of it when it’s writing C, easy to turn to spaghetti. Also the fat binary concept trips up agents - just have it read the actual cosmocc file itself to figure any issues out.
- VikingCoder 9mo agoI've got it working. Used Mongoose. Unfortunately Actually Portable Executables seem to not play well with WSL, and the suggested fixes didn't work. I'm able to play with it in a VM. Not as portable as I'd hoped, but I'll see how it goes.
- drowsspa 9mo agoI find it amazing how much the mess that building C/C++ code has been for so many decades seems to have influenced the direction technology, the economy and even politics has been going. Really, what would the world look like if this problem had been properly solved? Would the centralization and monetization of the Internet have followed the same path? Would Windows be so dominant? Would social media have evolved to the current status? Would we have had a chance to fight against the technofeudalism we're headed for?
- joshmarinacci 9mo agoHow does this technical issue affect the economy and politics? In what way would the world be different just because we used a better linker?
- nacozarina 9mo agoexistential crisis: so hot right now
- m463 9mo agoWell, you could just look at things from an interoperability and standards viewpoint. Lots of tech companies and organizations have created artificial barriers to entry. For example, most people own a computer (their phone) that they cannot control. It will play media under the control of other organizations. The whole top-to-bottom infrastructure of DRM was put into place by hollywood, and then is used by every other program to control/restrict what people do.
- drowsspa 9mo agoThat was the point of the successive questions in the second paragraph...
- AshamedCaptain 9mo agoWhat I find amazing is why people continously claim glibc is the problem here. I have a commercial software binary from 1996 that _still works_ to this day. It even links with X11, and works under Xwayland. The trick? It's not statically linked, but dynamically linked. And it doesn't like with anything other than glibc, X11 ... and bdb. At this point I think people just do not know how binary compatibility works at all. Or they refer to a different problem that I am not familiar with.
- Conscat 9mo agoIf the APE concept isn't appealing to you, you may be interested in the work on LLVM libC. My friend recently delivered an under-appreciated lecture on the vision: https://youtu.be/HtCMCL13Grg https://youtu.be/HtCMCL13Grg tl;dw Google recognizes the need for a statically-linked modular latency sensitive portable POSIX runtime, and they are building it.