jake2
jake2 copied to clipboard
Add WASM module loader for AI and other pluggable functionalities
Proposal to add foundation for a WebAssembly module loader. This will allow developing sandboxed plugins, developed in any language that can target WebAssembly
Options I found are
1. Wasmer
Pros
- Industrial strength interpreter guaranteeing correctness and performance.
Cons
- Contains native code, limits platform support to
amd64-{darwin,linux,windows}.
2. KTWasm
Pros
- Pure-kotlin implementation.
- Only ~3k lines of code, should be easy to debug and improve.
Cons
- Seems abandoned, lacking thorough documentation.
I would go for the second option, I don't think performance will be of an issue. Switching between options should be fairly straightforward as well.
If this sounds like a good idea I would require help with packaging or vendoring the dependency and integrating it into the game loop
So far the option 3. GraalVM WASM looks most promising approach