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.

Clodl: Turn dynamically linked ELF binaries into self-contained closures

56 pointsby vsurabhiabout 4 years ago

5 comments

risabout 4 years ago
Nix can do this for basically anything - even python scripts with all their dependency modules, binary extensions and all dynamic lib dependencies, packed up into a single .nar file.<p>nix-shell can even be used as a shebang-line for scripts: <a href="https:&#x2F;&#x2F;nixos.org&#x2F;manual&#x2F;nix&#x2F;stable&#x2F;#use-as-a-interpreter" rel="nofollow">https:&#x2F;&#x2F;nixos.org&#x2F;manual&#x2F;nix&#x2F;stable&#x2F;#use-as-a-interpreter</a>
评论 #27032199 未加载
评论 #27034061 未加载
jartabout 4 years ago
Author should consider using Actually Portable Executable for the bootstrapper.
fao_about 4 years ago
<p><pre><code> That is, given a shared library or a position independent executable (PIE), it returns a single, self-contained file packing all dependencies. [...] but closures do allow for deploying to other machines without concerns about missing dependencies. </code></pre> So. It&#x27;s a statically linked binary, but worse? Or like a PAR file, but for C? I&#x27;m really not sure what the benefits are here over statically linked binaries.<p>In fact, since it extracts to a directory in &#x2F;tmp, it seems to be worse in comparison -- since you have to take the increase in size into account.<p>I really do not see what the point of this is, or what niche it&#x27;s supposed to fill over flatpaks or appimages (which both have sandboxing), or why you would pick this over static libraries -- can someone explain this?
评论 #27032241 未加载
评论 #27030246 未加载
评论 #27030371 未加载
评论 #27032784 未加载
评论 #27030836 未加载
CalChrisabout 4 years ago
How is this different from prelink?<p><a href="https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;8&#x2F;prelink" rel="nofollow">https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;8&#x2F;prelink</a>
评论 #27031502 未加载
q3kabout 4 years ago
Great! I was considering writing some Bazel rules for _exactly_ this yesterday.