Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
C89cc.sh – standalone C89/ELF64 compiler in pure portable shell (gist.github.com)
7 points by gaigalas 1 hour ago | hide | past | favorite | 1 comment
 help



Single standalone file, no external tools used, PATH='' (empty), portable (bash, dash, ksh, zsh), produces x86 ELF executables, has mini-libc builtin.

Usage:

printf 'int main(){puts("hello");return 0;}' | sh c89cc.sh > hello

chmod +x hello

./hello




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: