Skip to content
/ holyc Public

An easy to use C++ to WASM compiler (Highly-experimental)

Notifications You must be signed in to change notification settings

xtuc/holyc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 29, 2018
4f165f7 · May 29, 2018

History

50 Commits
May 29, 2018
May 29, 2018
May 5, 2018
May 23, 2018
Apr 28, 2018
Apr 28, 2018
May 29, 2018
May 9, 2018
May 29, 2018
May 29, 2018
May 29, 2018
May 6, 2018

Repository files navigation

holyc

Installation

npm install -g holyc

The first installation will be slow.

Usage for C++

holyc++ path/to/something.cpp

The WASM binary will then be available at something.cpp.wasm.

Options

name description
--show-wast Show wast output
--no-clean Disable cleaning of intermediate formats

FAQ

How does it compare to Emscripten

Emscripten is able to compile the libc where Holyc won't.

You can easily reproduce this benchmark by following C_to_wasm.

hello.c:

int main() {
  return 0;
}

Emscripten:

file size (bytes)
hello.wasm 21856
hello.js (loader) 99710

Holyc:

file size (bytes)
hello.wasm 78
hello.js (loader) unknown currently (see here for a hint)