Skip to content

Include emscripten/fiber.h at global scope before minicoro.h - #1256

Merged
facontidavide merged 1 commit into
masterfrom
fix/emscripten-minicoro
Oct 24, 2026
Merged

facontidavide merged 1 commit into
masterfrom
fix/emscripten-minicoro

Conversation

@facontidavide

@facontidavide facontidavide commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1226.

minicoro.h (with MINICORO_IMPL) includes <emscripten/fiber.h> inside its own extern "C" block when building with Emscripten, and that breaks the build of src/action_node.cpp. This includes <emscripten/fiber.h> first, at global scope, so its include guard makes minicoro's nested include a no-op. There is no change on other platforms.

🤖 Generated with Claude Code

minicoro.h includes <emscripten/fiber.h> from inside its own
extern "C" block when building for Emscripten. That pulls Emscripten's
C++ headers (e.g. em_asm.h with its template specializations) in with C
linkage, and the build fails with "explicit specialization of undeclared
template struct '__em_asm_sig'".

Include <emscripten/fiber.h> in action_node.cpp, the only translation
unit that includes minicoro.h, before minicoro.h. The include guard then
prevents the second inclusion under extern "C". The vendored minicoro.h
is left untouched.

Fixes #1226

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@facontidavide
facontidavide merged commit e3e2fc4 into master Oct 24, 2026
16 checks passed
@facontidavide
facontidavide deleted the fix/emscripten-minicoro branch October 24, 2026 15:01
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebAssembly support for C++ development for browsers

1 participant