Live data from Hacker News

Oasis – a small, statically-linked Linux system

github.com

61–70 of 288 posts

Re: Oasis – a small, statically-linked Linux system

#61
post #31

Earlier quoted context omitted.

In a world where Docker and Kubernetes exist, where whole copies of operating systems are added to each running service... This seems a weird thing to complain about =)

Yeah but there I can still update vulnerable libraries independently, to be a statically linked system just means that if there is a bug in libpng then I have to recompile everything?

I was under the impression only Gentoo users recompile everything.

In a statically linked system, your dependency manager will update more packages.

And if your program is written in C/C++/Go/Rust, then yes, it will be recompiled.

Re: Oasis – a small, statically-linked Linux system

#62
post #56

Earlier quoted context omitted.

> incomplete dns resolving routines They eventually did fix this, as of musl 1.2.4.

While not an issue for musl-centric distros if they keep updated, note that e.g. Debian stable doesn't have that version yet, so good luck testing.

At least we have light at the end of the tunnel now. This is a tremendous improvement from the previous status quo of the musl maintainers not even agreeing that it's a problem.

Re: Oasis – a small, statically-linked Linux system

#64
post #10

There’s also the “suckless” sta.li

A comment up-thread (currently) says/implies Oasis is a successor to sta.li by the same person.

https://news.ycombinator.com/item?id=39143029

I also thought sta.li when I saw this was about a statically linked linux system...

Re: Oasis – a small, statically-linked Linux system

#65
post #50
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

I know lots of compilers/linkers don't optimize for it but it should be possible to 'tree shake' libraries so only the parts that are used by an application are included. That would shake off a lot of the 'bloat'.

Wait, it's not being done?

Re: Oasis – a small, statically-linked Linux system

#66
post #20

Doesn't linking everything statically imply that the base image -- and memory, at runtime -- will be bloated by many copies of libc and other common libraries? I do like the simplicity of static linking but it sort of seems to go against the idea of avoiding "bloat".

I guess each of the copies of libc can be optimized away and only the functions the specific binary calls will be left (and the compiler should be allowed to optimize past the library boundary), so maybe this balances the issues a bit.

Not that I really know anything about it, ask jart

Re: Oasis – a small, statically-linked Linux system

#67
post #33
post #31

Earlier quoted context omitted.

In a world where Docker and Kubernetes exist, where whole copies of operating systems are added to each running service... This seems a weird thing to complain about =)

I mean, if you ran every single executable on your desktop in a separate container I think you'd see problems. There are a pretty large number of programs running on most desktops, plus all the programs that get called by shell scripts, etc. Running a handful of containers representing major applications is more reasonable and the memory wastage may be worth it to avoid dependency conflicts.

Each electron app is like that

Re: Oasis – a small, statically-linked Linux system

#68
post #61

Earlier quoted context omitted.

Yeah but there I can still update vulnerable libraries independently, to be a statically linked system just means that if there is a bug in libpng then I have to recompile everything?

I was under the impression only Gentoo users recompile everything. In a statically linked system, your dependency manager will update more packages. And if your program is written in C/C++/Go/Rust, then yes, it will be recompiled.

I use Gentoo, so I am not against rebuild everything, but afaik unless you have static-libs USE flag for something, it's dynamically linked so relinking on rebuilding the dependency is enough, with static-libs the dependent package is also rebuilt

Re: Oasis – a small, statically-linked Linux system

#69
post #15
post #9

What is the comparison between using musl and traditional glibc? Is there performance differences between the two? I have been seeing musl used more and more in both Rust and Zig ecosystems lately.

> What is the comparison between using musl and traditional glibc? you get weird bugs and failures that don't happen with glibc (like the incomplete dns resolving routines that would fail under some conditions) but you can brag about saving 30-40 mb of disk space. this project seems to be compromising on quality overall, in the name of having smaller size. Even BearSSL, by their own website is beta-quality: "Current…

30-40mb of disk space is absolutely huge in some environments even today though

Re: Oasis – a small, statically-linked Linux system

#70
post #12

Interesting, but what is the use case? What is the advantage of using the croc C compiler instead of e.g. TCC? I wasn't aware of Netsurf ( https://www.netsurf-browser.org/); this is really amazing. But it seems to use Duktape as the JS engine, so performance might be an issue.

cproc supports C11, tcc only goes up to c99. There is also something to be said for cproc using QBE which is slowly growing backends like risc-v etc which tcc doesnt support afaik.

Ok, thanks, that makes sense. QBE looks interesting, but I'm missing 32 bit support. So currently I'm trying to reuse the TCC backend, which is far from trivial.
Post reply on HN