# jart/cosmopolitan

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jart-cosmopolitan).**

20,562 stars · 735 forks · C · isc

## Links

- GitHub: https://github.com/jart/cosmopolitan
- awesome-repositories: https://awesome-repositories.com/repository/jart-cosmopolitan.md

## Topics

`bios` `containers` `darwin` `efi` `freebsd` `libc` `linux` `netbsd` `openbsd` `polyglot` `windows` `zip`

## Description

Cosmopolitan is a cross-platform C runtime library and build framework that enables the creation of single-file, self-contained executables. By providing a unified set of system headers and a specialized compiler toolchain, it allows developers to write low-level systems code that executes natively across multiple operating systems without requiring recompilation for each target environment.

The project utilizes a polyglot binary format and a system call shimming layer to intercept and translate kernel requests, effectively bypassing standard library dependencies. This approach consolidates all necessary runtime code and library dependencies directly into the executable, resulting in binaries that function immediately on target machines without external configuration or pre-installed runtimes.

This framework supports the distribution of portable software that maintains compatibility across diverse environments, including legacy systems. The project is distributed as a development toolkit, providing the necessary infrastructure to build and deploy zero-dependency applications from a single source build.

## Tags

### Software Engineering & Architecture

- [Single-File Executables](https://awesome-repositories.com/f/software-engineering-architecture/application-frameworks/single-file-backend-servers/single-file-executables.md) — Enables the creation of single-file, self-contained executables that run natively across multiple operating systems without recompilation. ([source](https://justine.lol/cosmopolitan/))
- [Cross-Platform Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/cross-platform-abstractions.md) — Implements a standard library that abstracts operating system differences to enable native execution of binaries on multiple platforms.

### DevOps & Infrastructure

- [Static Compilation Toolchains](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/core-build-engines/build-toolchains/static-compilation-toolchains.md) — Provides a build system that produces self-contained executables without external dependencies or the need for recompilation on different target operating systems.
- [Cross-Platform Build Tools](https://awesome-repositories.com/f/devops-infrastructure/cross-platform-build-tools.md) — Provides the infrastructure to write low-level systems code that executes natively across multiple operating systems from a single source build.
- [Static Dependency Bundlers](https://awesome-repositories.com/f/devops-infrastructure/dependency-resolution/static-dependency-bundlers.md) — Bundles all necessary library code and runtime dependencies directly into the executable to eliminate external runtime requirements.

### Development Tools & Productivity

- [Single-Binary Distributions](https://awesome-repositories.com/f/development-tools-productivity/single-binary-distributions.md) — Packages software into a single executable file that runs across multiple operating systems without requiring recompilation or external dependencies.
- [Zero-Dependency Build Systems](https://awesome-repositories.com/f/development-tools-productivity/zero-dependency-build-systems.md) — Distributes applications that function immediately on any target machine without needing to install runtimes, libraries, or specific system configurations.

### Repository Format

- [Polyglot Binaries](https://awesome-repositories.com/f/repository-format/polyglot-binaries.md) — Utilizes a custom executable file structure that embeds multiple platform-specific headers to allow the same binary to execute on different operating systems.

### Operating Systems & Systems Programming

- [System Calls](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/system-calls.md) — Implements a translation layer that intercepts low-level kernel requests and maps them to the appropriate native interface for each supported operating system.
- [Compatibility Layers](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/legacy-system-preservation/compatibility-layers.md) — Supports running modern software applications on older or restricted operating systems by bypassing standard library dependencies.

### Programming Languages & Runtimes

- [Dependency-Free Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/deployment-specific-runtimes/dependency-free-runtimes.md) — Provides a minimal execution environment embedded within the binary that handles process initialization without relying on standard system libraries.
