I recently released a project that got FNA working on wasm (albeit with SharedArrayBuffer):
https://github.com/ValorZard/fna-native-wasm-combo
The TL;DR is I have to build FNA twice, and link to two different versions of it depending if I want to build for WASM or not.
However, this is only necessary because FNA needs some (pretty minor) patches for this to work:
On the example project
And the patched WASM binaries from https://github.com/r58Playz/FNA-WASM-Build/tree/main
Extra comment from @r58Playz on discord
f you swap to the ST-* artifacts, remove wasmenablethreads, and disable wasmfs you can drop the requirement for sharedarraybuffer but that also means you don't get easy fs backends like fetchfs (fetch assets on demand from c#) and opfs (persistent storage that can be accessed from js easily)
I wonder if this could be added to FNA itself as some sort of conditional implementation thing, and then we could test it by using CI/CD?
I recently released a project that got FNA working on wasm (albeit with SharedArrayBuffer):
https://github.com/ValorZard/fna-native-wasm-combo
The TL;DR is I have to build FNA twice, and link to two different versions of it depending if I want to build for WASM or not.
However, this is only necessary because FNA needs some (pretty minor) patches for this to work:
On the example project
And the patched WASM binaries from https://github.com/r58Playz/FNA-WASM-Build/tree/main
Extra comment from @r58Playz on discord
I wonder if this could be added to FNA itself as some sort of conditional implementation thing, and then we could test it by using CI/CD?