Better HN
topnewbestaskshowjobs
Log inSign up

realexweb

29 karma · joined Jul 30, 2026 (3mo ago) · 16 submissions

Alex. I build kern, a rootless container runtime and sandbox in one static binary: https://github.com/getkern/kern

hello@getkern.dev

Submissions

comment 1mo ago · link · parent

I created this tool because I kept running code that an LLM just wrote in my home folder. That felt risky. Every time you run a command it happens in its container. The container runs without network access by default. It's rootless. Once the command finishes the container gets deleted. It cleans up after itself.

It uses Linux namespaces, cgroups and seccomp. Not a microVM. It is lightweight and fast.

2.

Show HN: Kern Sandbox, run LLM-generated code locally, no cloud, no daemon(getkern.dev ↗)

4 points · by realexweb · 1mo ago · 1 comment

comment 3mo ago · link · parent

Image already pulled: 3.7 ms for the box, and a shell command adds nothing on top (3.73 vs 3.71 over 100 runs, alpine).

Python is 15.6 ms in a python:3.12-slim box, but ~12 of that is CPython starting, which you pay on bare metal too.

Cold cache is a different order: the pull dominates and is network bound. Alpine 2.7 s, python:3.12-slim 9.0 s for 41 MB, once.

comment 3mo ago · link · parent

The meaning of un‑cached can vary. The two un‑cached answers are very different. I will give both.

When the image has already been pulled the container takes 3.7 milliseconds. Adding a command does not add any time. I ran /bin/sh -c 'echo hi' inside an alpine image. Over 100 runs the time was 3.73 milliseconds. Running /bin/ in the container gave 3.71 milliseconds. Python is a number because it is CPython that is starting not the isolation. Running python3 -c 'print(1)' inside a python:3.12-slim container takes 15.6 milliseconds. Twelve milliseconds of that time is spent starting the interpreter. The same delay exists on metal.

If the image is not, in the cache then pulling the image dominates the time. Pulling is limited by the network not by runtime. On my connection pulling alpine took 2.7 seconds. Pulling python:3.12-slim took 9.0 seconds for 41 megabytes of layers. This happens once; after the image is cached the times above apply again. The command 'kern pull' pulls the image in advance if you want to pick when this happens.

I measured these times on the desktop described in the README. The system has an i7‑14700KF processor running Linux 7.0.

comment 3mo ago · link · parent

smolvm is a microVM .kern is plain OS-level isolation

comment 3mo ago · link · parent

thanks.. let me know how it goes or if you hit any issues

comment 3mo ago · link · parent

Fair, and it's not CRI. The README's limits section says "Not a Kubernetes runtime. No CRI. Use containerd or CRI-O." I meant runtime in the docker/podman sense, pull and build and lifecycle in one binary, and you're right that the word is overloaded enough that the title doesn't carry that by itself.

Since you're building it, two things you'll hit before you hit the docs. cargo install needs the package name, because it searches the whole repo and finds three packages with binaries (the CLI, the fuzz harness, the Windows shim):

cargo install --git https://github.com/getkern/kern getkern --locked

And a source build is 1.91 MB, not the 1.5 in the title. The release binary is smaller because CI builds it with a pinned nightly, build-std and optimize_for_size, on an opt-level="z" profile; the source stays plain stable Rust on purpose, so building doesn't need nightly.

Interested in what breaks.

8.

Show HN: Kern – container and resource runtime in a 1.5 MB binary, no daemon(github.com ↗)

70 points · by realexweb · 3mo ago · 9 comments

comment 3mo ago · link · parent

Genuine question rather than a criticism: what do the tools actually execute in?

I spent last week asking people running local agents what their generated code runs inside, and the answer was consistently "nothing" - same filesystem, same network, same credentials as the agent itself. One person reviews everything with a second model and then reads it himself, which is the most careful answer I got and still isn't a boundary.

That's fine while a tool is reading a file. It stops being fine the moment the tool is "run this". Does Mu draw a line there, or is it left to the host?

comment 3mo ago · link · parent

I've been benchmarking bare CPython startup for something unrelated and get 7.5ms median for python3 -c 'pass' on this machine, 5.3 with -S. That floor is most of the cost for anything short-lived.

Does compiling natively bypass interpreter init entirely, or does the CPython fallback path mean you still pay it on the calls that fall back?

comment 3mo ago · link · parent

Nice size. I've been fighting the same fight in Rust and landed at 1.9 MB for a static-pie musl binary, which is about as far as I could push it without giving up features.

Two things that cost me the most, curious if they hit you the same way in C++: shelling out to curl and tar for HTTPS and decompression instead of linking them, which saved maybe 15 MB but means those tools have to exist on the host, and staying static, since musl won't dlopen from a static binary at all, so there's no plugin split available as an escape valve.

What's actually in your 1 MB, and did you have to give anything up to stay under it?

comment 3mo ago · link · parent

link