Home

Awesome

XCC

Action Status Open in Gitpod

C compiler running on Linux or MacOS.

Requirements

Build

$ make

Generated files:

Usage

$ ./xcc -o hello examples/hello.c
$ ./hello
Hello, world!

Command line options

TODO

Reference


WebAssembly

Compile C to WebAssembly/WASI binary.

Online demo

Requirements

Set up

$ npm ci

Build

$ make wcc

Generated files:

Usage

Compile:

$ ./wcc -o hello.wasm examples/hello.c

Command line options:

Run

$ ./tool/runwasi hello.wasm
Hello, world!

You can also use WASM/WASI runtime (Wasmtime, Wasmer, etc.), too.

Missing features