Skip to content

web: Use wasm exception when enabled - #2058

Draft
Faless wants to merge 1 commit into
godotengine:masterfrom
Faless:web/wasm_exceptions
Draft

Faless wants to merge 1 commit into
godotengine:masterfrom
Faless:web/wasm_exceptions

Conversation

@Faless

@Faless Faless commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Depends on godotengine/godot#124118 which compiles the main runtime with exceptions enabled.

@Faless Faless added enhancement This is an enhancement on the current functionality waiting for Godot PRs that can't be merged until an engine PR is merged first platform:web topic:buildsystem Related to the buildsystem or CI setup labels Oct 2, 2026
@Faless
Faless force-pushed the web/wasm_exceptions branch from 8009a1c to 99777f3 Compare October 2, 2026 23:51
@Faless
Faless force-pushed the web/wasm_exceptions branch from 99777f3 to 0d92eaa Compare October 2, 2026 23:52
@dsnopek

dsnopek commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

What happens if someone builds with this flag and their extension is loaded in an older version of Godot that doesn't have godotengine/godot#124118?

Since we now support building extensions for Godot 4.3+ from a single version of godot-cpp, do we need to add a version check for using this flag?

Something like:

def parse_version(v):
    return tuple(int(x) for x in v.split("."))

def generate(env):
    # ...
    if not env["disable_exceptions"] and parse_version(env["api_version"]) >= (4, 8):
        env.Append(CCFLAGS=["-fwasm-exceptions"])
        env.Append(LINKFLAGS=["-fwasm-exceptions"])

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

Labels

enhancement This is an enhancement on the current functionality platform:web topic:buildsystem Related to the buildsystem or CI setup waiting for Godot PRs that can't be merged until an engine PR is merged first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants