Skip to content

pothos/rust-userland

Repository files navigation

Rust userland container image

A puristic exercise to build a useable Linux container image consisting of nsh as shell (instead of GNU Bash), Rust coreutils (instead of GNU coreutils), ripgrep (instead of GNU grep), and frawk (instead of GNU awk).

For convenience a text editor is part of the image, currently this is kiro-editor (but more are possible, please suggest others).

It uses eyra instead of glibc and only uses static binaries. The container does not ship a libc and you are expected to copy static binaries into it if you want to extend it.

Usage

From the prebuilt image:

docker run --rm -it ghcr.io/pothos/rust-userland:main

From a locally built image:

make
docker run --rm -it rust-userland

TODO

  • Add more common tools, specially those that are not in coreutils but are expected to usually exist, e.g., ps, sed, gzip, diff, less, ip (and others from iproute2), mount (and others from util-linux), sudo, curl, wget, …
  • Add more new tools written in Rust that provide similar/valuable functionality but aren't a drop-in (some already included) - Edit: Dropped for now and needs to be added back: As incompatible alternative to ps there is procs, for top there is bottom (btm), for sed there is sd, for find there is fd. It also ships bat as improvement over cat and choose as improvement over cut.
  • Add getent as user and DNS resolver (passwd, group, initgroups, services, ahosts, ahostsv4, ahostsv6) for c-ward

PRs welcome ;)

Note: nsh development is stalled and one could also try to get fish working instead

Note: frawk has a different regex format than awk

About

Rust userland container image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages