Improve C# WASM runtime binding loading and logging#147
Open
Arnold-Seb wants to merge 1 commit intothoth-tech:mainfrom
Open
Improve C# WASM runtime binding loading and logging#147Arnold-Seb wants to merge 1 commit intothoth-tech:mainfrom
Arnold-Seb wants to merge 1 commit intothoth-tech:mainfrom
Conversation
kottochii
approved these changes
May 4, 2026
kottochii
left a comment
There was a problem hiding this comment.
The changes are legitimate and solve the problem of quiet failures, exposing the root problems with method referencing.
I, however, would like to keep an issue in the backlog to resolve the missing bindings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change improves the stability of the C# WebAssembly runtime in SplashKit Online by addressing issues in the JavaScript binding layer.
During testing, the runtime failed to initialise reliably due to the binding loader attempting to resolve all generated SplashKit functions using
eval(). Since many of these functions are not available in the browser runtime, this resulted in runtime crashes and prevented C# programs from executing correctly.The binding logic in
CSharpWasmExpo/main.jshas been updated to safely check for function availability before assignment. Missing functions are now skipped, and warnings are logged instead of causing failures. This allows the runtime to initialise successfully even when bindings are incomplete.Additionally, basic handling for
process_eventshas been introduced to improve debugging visibility when the function is not properly wired.This change resolves the runtime initialisation crash and provides clearer insight into missing bindings, supporting further investigation of incomplete API coverage in the C# runtime.
Fixes # (runtime initialisation crash caused by missing JS bindings)
Type of change
How Has This Been Tested?
The changes were tested locally using the SplashKit Online development environment.
Steps:
npm startExpected / Observed Results:
process_eventsis still not fully wired, confirming improved debugging visibilityTesting Checklist
Checklist