# Emscripten Documentation

This comprehensive documentation set contains everything you need to know to use Emscripten.

Getting started:

- Introducing Emscripten explains what Emscripten does, why it is needed, its limitations and its licensing. It will help you understand whether Emscripten is the right tool for you.

- Getting Started walks you through downloading, installing and using the Emscripten SDK.

Emscripten Fundamentals:

- Porting illustrates the main differences between the native and Emscripten runtime environments, and explains the changes you need to make to prepare your C/C++ code for the Web.

- Optimizing Code shows how to optimise your code for size and performance.

- Optimizing WebGL gives tips for how to maximize WebGL rendering performance for your page.

- Compiling and Running Projects demonstrates how to integrate Emscripten into your existing project build system.

Contributing:

- Contributing to Emscripten explains how you can contribute to the project.

- Building Emscripten from Source explains how to build Emscripten from sources on GitHub (this is useful for contributors).

- About this site describes the documentation tools and writing conventions used to create this site.

Reference:

- API Reference is a reference for the Emscripten toolchain.

- Emscripten Compiler Settings is a reference of all the Emscripten compiler settings.

- Tools Reference is a reference for the Emscripten integration APIs.

- Debugging with Sanitizers shows how to debug with sanitizers.

- Module Splitting is a guide to splitting modules and deferring the loading of code to improve startup time.

The full hierarchy of articles, opened to the second level, is shown below.

- Introducing Emscripten
  - About Emscripten
  - Community
  - Open Source License
  - Release Notes
  - Talks and Publications
- Getting Started
  - Download and install
  - Emscripten Tutorial
  - Emscripten Test Suite
  - Bug Reporting
  - FAQ
- Porting
  - Code Portability and Limitations
  - Emscripten Runtime Environment
  - Connecting C++ and JavaScript
  - Files and File Systems
  - Multimedia and Graphics
  - Audio
  - Debugging
  - Pthreads support
  - Networking
  - Using SIMD with WebAssembly
  - C++ Exceptions Support
  - C setjmp-longjmp Support
  - Asynchronous Code
  - Building Projects
- Optimizing Code
  - How to optimize code
  - How Emscripten optimizes
  - Link Times
  - Advanced compiler settings
  - WebAssembly
  - Code size
  - LTO
  - EVAL_CTORS
  - Very large codebases
  - Other optimization issues
  - Unsafe optimizations
  - Profiling
  - Troubleshooting poor performance
- Optimizing WebGL
  - Which GL Mode To Target?
  - How To Profile WebGL
  - Avoid Redundant Calls
  - Techniques To Minimize API Calls
  - Avoid GPU-CPU Sync Points
  - GPU Driver Friendly Memory Access Behavior
  - When The GPU Is The Bottleneck
  - Optimizing Load Times and Other Best Practices
  - Migrating To WebGL 2
- Profiling the Toolchain
  - Quick Example
  - Details
  - Instrumenting Python Scripts
- Module Splitting
  - Basic Example
  - Profiling Multiple Workloads
  - Multithreaded Programs
  - Running on the Web
  - Usage with Dynamic Linking
  - Custom Loading of the Secondary Module
  - Debugging
  - Upcoming Changes
- Compiling and Running Projects
- Building Emscripten from Source
  - Building LLVM
  - Building Binaryen
- Contributing to Emscripten
- API Reference
- Tools Reference
- Debugging with Sanitizers
  - Undefined Behaviour Sanitizer
  - Address Sanitizer
- Site Links
  - About this site
  - Glossary