MyGit

2.2

jart/cosmopolitan

版本发布时间: 2022-11-07 19:11:08

jart/cosmopolitan最新发布版本:3.3.6(2024-05-08 19:24:03)

Cosmopolitan Libc makes C/C++ a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS or UEFI with the best possible performance and the tiniest footprint imaginable.

Getting Started

If you use Linux, then you can build Cosmopolitan and its included software from source as follows:

wget https://justine.lol/cosmopolitan/cosmopolitan-2.2.tar.gz
tar xf cosmopolitan-2.2.tar.gz
cd cosmopolitan
build/bootstrap/make.com -j8
o//examples/hello.com

If you're doing your development work on Linux or BSD and you want to bring your own build system, then you need just five files to get started:

wget https://justine.lol/cosmopolitan/cosmopolitan-amalgamation-2.2.zip
unzip cosmopolitan-amalgamation-2.2.zip
printf 'main() { printf("hello world\\n"); }\n' >hello.c
gcc -g -Os -static -nostdlib -nostdinc -fno-pie -no-pie -mno-red-zone -gdwarf-4 \
  -fno-omit-frame-pointer -pg -mnop-mcount -mno-tls-direct-seg-refs \
  -o hello.com.dbg hello.c -fuse-ld=bfd -Wl,-T,ape.lds -Wl,--gc-sections \
  -include cosmopolitan.h crt.o ape-no-modify-self.o cosmopolitan.a
objcopy -S -O binary hello.com.dbg hello.com

Features

Fixes and Improvements

Breakages

相关地址:原始地址 下载(tar) 下载(zip)

1、 cosmopolitan-2.2.tar.gz 61.84MB

2、 cosmopolitan-amalgamation-2.2.zip 7.4MB

3、 cosmopolitan-amalgamation-dbg-2.2.zip 12.16MB

4、 cosmopolitan-amalgamation-rel-2.2.zip 7.39MB

5、 cosmopolitan-amalgamation-tiny-2.2.zip 2.66MB

6、 cosmopolitan-amalgamation-tinylinux-2.2.zip 2.6MB

查看:2022-11-07发行的版本