From e3ab29bb4d7174cae65de2275f19105eb3d93d91 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Sun, 25 Jan 2026 18:24:05 +0000 Subject: APE shall never kill APE --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index ce72729..91634a3 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,29 @@ make sudo make install ``` +### Portable Build (APE) + +Zen C can be compiled as an **Actually Portable Executable (APE)** using [Cosmopolitan Libc](https://github.com/jart/cosmopolitan). This produces a single binary (`.com`) that runs natively on Linux, macOS, Windows, FreeBSD, OpenBSD, and NetBSD on both x86_64 and aarch64 architectures. + +**Prerequisites:** +- `cosmocc` toolchain (must be in your PATH) + +**Build & Install:** +```bash +make ape +sudo env "PATH=$PATH" make install-ape +``` + +**Artifacts:** +- `out/bin/zc.com`: The portable Zen-C compiler. Includes the standard library embedded within the executable. +- `out/bin/zc-boot.com`: A self-contained bootstrap installer for setting up new Zen-C projects. + +**Usage:** +```bash +# Run on any supported OS +./out/bin/zc.com build hello.zc -o hello +``` + ### Usage ```bash @@ -1223,5 +1246,8 @@ make test This project uses the following third-party libraries: -* **cJSON** (MIT License): Used for JSON parsing and generation in the Language Server. + +* **[cJSON](https://github.com/DaveGamble/cJSON)** (MIT License): Used for JSON parsing and generation in the Language Server. * Copyright (c) 2009-2017 Dave Gamble and cJSON contributors +* **[zc-ape](https://github.com/OEvgeny/zc-ape)** (MIT License): The original Actually Portable Executable port of Zen-C. The APE integration in this repository is based on this work by [OEvgeny](https://github.com/OEvgeny). +* **[Cosmopolitan Libc](https://github.com/jart/cosmopolitan)** (ISC License): The foundational library that makes APE possible. -- cgit v1.2.3