All apps/Emscripten

Emscripten

emscripten

A complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform.

Runs as emcc, em++, emar, emcmake, emconfigure|macOS, Linux, Windows|emscripten.org

Command form

ai-draft · 2 tasks · 12 fields

Compile C/C++ sources to WebAssembly and JavaScript with emcc (em++ takes the same options). Optimization levels are separate switches; pick at most one. Other -s settings and clang options are not covered.

Opens the form; the finished command lands at your prompt, unrun
otty gui emscripten
Compile with emccExample values, fixed in this page — nothing here reaches a terminal
Basic
Source files*
file
Output file*
file
Optimize (-O2)
-O2
Advanced
HTML shell file
file
TasksEach one presets the form for one job
Build a web page
inputsoutputo2shell_file
Build a JavaScript module
inputsoutputo2
ParametersOnly these flags are editable in the form
Source files
path · positional 0 · repeatable
Output file
The extension picks the output type, for example .html, .js or .wasm.
path
-o
Compile only
Produce an object file instead of linking.
boolean
-c
Optimize (-O2)
boolean
-O2
Optimize more (-O3)
boolean
-O3
Optimize for size (-Oz)
boolean
-Oz
Debug info
boolean
-g
Embed file
Embed a file or directory in the generated output.
path · repeatable
--embed-file
Preload file
Package a file or directory to load before the program starts.
path · repeatable
--preload-file
HTML shell file
path
--shell-file
Embind bindings
boolean
--bind
Closure compiler
enum
--closure012
SourcesEvery flag above is checked against these
emcc
emcc [options] file... "-O2" "-O3" "-Oz" "-g" "--closure 0|1|2" "--embed-file <file>" "--preload-file <name>" "--shell-file <path>" "--bind" "-o <target>" "-c"
manual2026-10-27

emscripten.org

Before it fills your prompt, Otty checks the installed emcc against its version. A form that does not match your version is not offered.