containers/crun logo

containers/crun

Free

A fast and lightweight fully featured OCI runtime and C library for running containers

FreeFree tier
Type
Open Source

About containers/crun

crun is a fast and low-memory footprint OCI (Open Container Initiative) container runtime written entirely in C. It conforms to the OCI Container Runtime specifications, providing an alternative to runc. crun is designed to be usable as a library (libcrun) that can be embedded directly into programs without requiring an external process for managing OCI containers. Benchmarks show crun is significantly faster and uses less memory than runc, enabling stricter resource limits such as running containers with as little as 512k of memory. The project is developed by containers/crun on GitHub and is open source under GPL-2.0.

Key Features

Fully written in C for low overhead and high performance
OCI Container Runtime specification compliant
Embeddable as a C library (libcrun) for direct integration
Faster and lower memory footprint than runc (up to 49% faster in sequential 100-container tests)
Supports strict memory limits (e.g., 512k memory container)
Runs on Fedora, RHEL/CentOS, Ubuntu, and other Linux distributions
Open source under GPL-2.0

Pros & Cons

Pros
  • Significantly faster than runc (49% improvement in sequential container startup)
  • Very low memory footprint, enabling stricter container resource limits
  • Written in C, suitable for low-level container runtime tasks
  • Can be used as a library (libcrun) for embedding OCI container management
  • Actively maintained and part of the containers project ecosystem
Cons
  • Less widely adopted than runc, potentially smaller community and ecosystem
  • Requires manual compilation and dependency installation on some distributions
  • Fewer high-level features compared to runc (e.g., no built-in checkpoint/restore)

Best For

High-performance container runtime for production environmentsResource-constrained or embedded systems requiring minimal memory usageIntegrating OCI container management directly into custom applications via libcrun libraryReplacing runc in container runtimes like Podman for better performance

FAQ

Why was crun created instead of using runc?
The developer believes C is a better fit for low-level container runtime tasks. runc is written in Go and re-execs itself, while crun is written in C and can be used as an embedded library (libcrun) without an external process.
How does crun compare to runc in performance?
crun is faster and has a lower memory footprint. In a test running 100 sequential containers executing /bin/true, crun took 0:01.69 vs runc's 0:3.34, a 49.4% improvement.
What are the build dependencies for crun?
On Fedora: autoconf, automake, gcc, git-core, glibc-static, go-md2man, libcap-devel, libseccomp-devel, libtool, make, pkg-config, python, python-libmount, systemd-devel, json-c-devel. On Ubuntu: make, git, gcc, build-essential, pkgconf, libtool, libsystemd-dev, libprotobuf-c-dev, libcap-dev, libseccomp-dev, python3, python3-libmount, pkg-config, libjson-c-dev.
Is crun open source?
Yes, crun is open source and licensed under GPL-2.0, with the libcrun library under LGPL-2.1.