by ahgamut on 7/28/22, 4:54 AM with 103 comments
by mihaigalos on 7/28/22, 5:21 AM
Check out Bazel for Rust.
It allows:
* caching of artifacts.
* shareable caches between {developers, build jobs} based on hashes.
* remote distributed builds (on very many cores).
by csomar on 7/28/22, 5:34 AM
Like OP I hit two walls: libunwind, and linking. For libunwind, I ended up downloading/compiling manually; and for linking there is auditwheel[1]. Although it is a Python tool, I did actually end up using it for Ruby (by creating a "fake python package", and then copying the linked dependencies).
It was at that time that I learned about linking for dynamic libraries, patchelf and there is really no single/established tool to do this. I thought there should be something but most people seem to install the dependencies with any certain software. I also found, the hard way, that you still have to deal with gcc/c when working with Rust. It does isolate you from many stuff, but for many things there is no work around.
There is a performance hit to this strategy, however, since shared dynamic libraries will be used by all the running programs that need them; whereas my solution will run its own instance. It made me wonder if wasm will come up with something similar without affecting portability.
Finally, the project is open source and you can browse the code here: https://github.com/pyroscope-io/pyroscope-rs
by forrestthewoods on 7/28/22, 6:07 AM
I’m all about writing code once. But compiling a few times doesn’t seem like that big of a deal to me?
The article says it runs on “six operating systems” but I can’t find them listed?
by logankeenan on 7/28/22, 1:22 PM
by zaphar on 7/28/22, 12:05 PM
I’d change a configuration flag, some part of std would break because my
flag was wrong, and I’d learn something new about Rust and how std worked.
The project was probably worth doing just because of this. Breaking things in a safe environment is such a great way to learn how it all works.by techdragon on 7/28/22, 9:45 AM
The library this is built on does have a bit of a weakness with respect to GUI software https://github.com/jart/cosmopolitan/issues/35 if this can be fixed this will be an amazing tool for building simple cross platform utilities and tools.
by manholio on 7/28/22, 10:31 AM
Software distribution is by its nature a very platform specific problem; even if we accept the premise of an x64 world, an universal binary solves just a very small portion of the practical problems of portable deployment.
Ironically, the best use case I can imagine is creating an universal binary installer that can run on any Unix system and then proceed to make platform-specific decisions and extract files contained in itself, sort of like Windows binary installers work. But that's an utterly broken distribution model compared to modern package managers.
by childintime on 7/28/22, 9:52 AM
by ajross on 7/28/22, 3:50 PM
I help maintain a kernel in C that runs on nine architectures, some of which don't even have LLVM backends, much less stable rust toolchains.
"Portable" means rather different things. This blog post is focused on the easy stuff.
by aabbcc1241 on 7/28/22, 8:34 AM