WebAssembly 2020
No edit summary
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Update and notes on WebAssembly ( WASM ) status.
'''Update and notes on WebAssembly (WASM) Status.'''


The WASM and MONO linkers strip stuff not discovered as important (used) and this has been an issue for MDriven since we do some reflection to discover what to use in runtime (after linker). This has caused exceptions with "missing method" information.
The WASM and MONO linkers strip stuff not discovered as important (used), and this has been an issue for MDriven since we do some reflection to determine what to use in runtime (after linker). This has caused exceptions with "missing method" information.


If you add tagged value to package "CodeGen.GenerateConstructorReferences" we will generate use of certain important things that the linker before has stripped. You must add a reference to this new method to tie your code to this and avoid stripping by linker: '''YourPackage.ConstructorReferatorToAvoidLinkerStripping'''() .
If you add a tagged value to the package "CodeGen.GenerateConstructorReferences", we will generate the use of certain important things that the linker before has stripped. You must add a reference to this new method to tie your code to this and avoid stripping by linker: '''YourPackage.ConstructorReferatorToAvoidLinkerStripping'''() .


Furthermore the same issue exists for code generated ViewModels and you must call : ClassLibrary1.ViewModelCodeGen_ViewModel1.'''ViewModel1.ReferenceToAllConstructorsToHelpWasmLinker'''();
One mitigation is that we now generate an extra Attribute with codegen called Preserve: The Preserve attribute is recongnised by Mono linker and instructs it to NOT prune away even is no usage is seen.
 
Furthermore, the same issue exists for code-generated ViewModels, and you must call: '''ClassLibrary1.ViewModelCodeGen_ViewModel1.ViewModel1.ReferenceToAllConstructorsToHelpWasmLinker();'''
 
We will try to make use of the UNO framework together with MDriven to bring model-driven benefits and one source to all the most common platforms:
[[File:Unodiagram.png|none|thumb]]
[[Category:Beta Testing]]
{{Edited|July|12|2024}}

Latest revision as of 10:01, 19 March 2024

Update and notes on WebAssembly (WASM) Status.

The WASM and MONO linkers strip stuff not discovered as important (used), and this has been an issue for MDriven since we do some reflection to determine what to use in runtime (after linker). This has caused exceptions with "missing method" information.

If you add a tagged value to the package "CodeGen.GenerateConstructorReferences", we will generate the use of certain important things that the linker before has stripped. You must add a reference to this new method to tie your code to this and avoid stripping by linker: YourPackage.ConstructorReferatorToAvoidLinkerStripping() .

One mitigation is that we now generate an extra Attribute with codegen called Preserve: The Preserve attribute is recongnised by Mono linker and instructs it to NOT prune away even is no usage is seen.

Furthermore, the same issue exists for code-generated ViewModels, and you must call: ClassLibrary1.ViewModelCodeGen_ViewModel1.ViewModel1.ReferenceToAllConstructorsToHelpWasmLinker();

We will try to make use of the UNO framework together with MDriven to bring model-driven benefits and one source to all the most common platforms:

Unodiagram.png
This page was edited 45 days ago on 03/19/2024. What links here