Skip to content

v1.5.1 — WASM build tools

Choose a tag to compare

@zackees zackees released this 19 May 04:03
· 23 commits to main since this release
cf9a10b

The WASM build tools release. Closes #22, #23, #25.

Highlights

ctc-wasm-ld integration with emcc (#22 / #24)

  • clang-tool-chain install emscripten now patches emscripten/tools/shared.py to honour EMCC_WASM_LD, letting downstream projects swap in ctc-wasm-ld for the bundled linker.
  • ctc-em++ / ctc-em-cpp auto-inject EMCC_WASM_LD pointing at the sibling ctc-wasm-ld when falling through to Python emcc.py — no build-system changes required.

49 new console-script entry points (#23 / #26)

Every emscripten / Binaryen tool the SDK ships now has both a clang-tool-chain-* long form and a ctc-* short alias:

Category Tools
Archive / inspection emar, emstrip, emranlib, emnm
Heavy WASM build emcc, em-cpp, wasm-ld
Build orchestration emcmake, emmake, emconfigure, emscons, embuilder
Inspection / debug em-config, emsize, emrun, emscan-deps, emsymbolizer, emdwp, emcoverage, emprofile
Binaryen native binaries wasm-opt, wasm-as, wasm-dis, wasm-emscripten-finalize, wasm-merge, wasm-metadce, wasm-ctor-eval, wasm-shell

PyPI rejects ++ in entry-point names, so the C++ variant of em++ is ctc-em-cpp. The compiled native launcher ctc-em++.exe still wins on PATH when compile-native runs.

Native launcher consolidation (#25 / #27)

compile-native now produces one binary + 17 hardlinks instead of 17 separate compile targets. argv[0] basename dispatches to the right emscripten Python script — same idiom clang uses for clang / clang++ / clang-cl. Saves ~19 MB per platform.

  • Windows: NTFS hardlinks (os.link) with copy fallback for FAT/exFAT/cross-volume.
  • Linux/macOS: symlinks.

Internal cleanup

  • Shared ctc_common.h consolidates platform/arch/path/env/process/cache helpers across all four native launchers — 861 lines (19%) of duplicated C++ removed.
  • Lightweight execute_emscripten_py_tool skips the Node.js ensure step for the 17 emscripten tools that don't run JS (saves ~10–30 s first-run download).

Install

pip install --upgrade clang-tool-chain

Verify

ctc-wasm-opt --version       # Binaryen wasm optimizer
ctc-emsymbolizer --help      # WASM stack-trace symbolizer
clang-tool-chain compile-native ./bin && ls -la ./bin/ctc-em*

Known issues

Linux clang-linux-* / lldb-linux-* / valgrind-linux-arm CI jobs are red — these failures pre-date this release and are tracked separately. Mac and Windows CI is green.

🤖 Generated with Claude Code