Hopefully that's helpful context. Overall since I did linux from scratch half a lifetime ago I've always wondered why something like Oasis hasn't gotten more traction. It's got some ambitious ideas in the README so maybe others have other nice use-cases atop all that. I just see small, statically linked and think 'oh boy if i never have to build my own tools again for some weird board'. If so, I'm here for it.
This is a cool approach on Docker as well.
FROM some:thing AS bins
FROM debian:latest
COPY --from=bins /bin/foo /bin/And then when Nix† is not an option at runtime, dockerTools†† can build a Docker image to do the minimisation+isolation.
That said, Nix might also be completely overkill in some scenarios where static linking would be just fine and very practical. The practical simplicity of a single binary should not be overlooked.
† nixpkgs is sufficient, a full nixos is not needed
†† https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-dockerTool...
Is oasis the "drop in binary" you would use? Or do you use oasis to build the tool that you would use?
"The allure of something like this is I could potentially grab a drop in binary"
From where?
At this point, it would be more useful if someone explained a couple of use cases for dynamic linking.
Which in the days of running Kubernetes clusters on laptops maybe isn't a big deal.
https://github.com/bpowers/musl/blob/master/src/ldso/dlopen....
I tried to hack in a copy of the musl's dynamic loader (and also from old uclibc). But it took a few hours and my only result was segfaults.
Do you have any pointers on making this work?
To debug your problem, do you have a minimal example at your fingertips to try? Just a "hello world" dynlib that is called from a static program that doesn't do anything else.
P.S. - oh! and I had friends that loved HP/UX - another one I never got to try