mochi-neko / wasmer-unity

Provide a C# interface of Wasmer, one of the WebAssembly runtimes, integrating as a native plugin in Unity..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wasmer-unity

Aims to provide a C# interface of Wasmer, one of WebAssembly runtimes, integrating as a native plugin for Unity.

Motivation

There is no best library to use Wasm on Unity/C#.

The following are the best features I think:

  • uses a famous Wasm runtime as native plugin,
  • maintained to stay close to the latest version of the original,
  • supports major platforms: Windows, macOS(Intel/AppleSilicon), Linux, Android(ARM64/ARMv7) and iOS including AoT compilation.

Milestones

  1. Implement minimal Wasm API for hello world.
  2. Implement native Wasm API with samples.
  3. Make demo on Unity.
  4. Implement headless in Wasmer API.
  5. Prepair Wasmer build environment for Android/iOS.
  6. Implement WASI API.
  7. Implement features in Wasmer API.

Implemntation

Native Wasm API

  • Config
  • Engine
  • Store
  • ByteVector
  • ValueType
  • FunctionType
  • GlobalType
  • TableType
  • MemoryType
  • ExternalType
  • ImportType
  • ExportType
  • Trap
  • Foreign
  • Module
  • ValueInstance
  • FunctionInstance
  • GlobalInstance
  • TableInstance
  • MemoryInstance
  • ExternalInstance
  • Instance

Wasmer API

  • Wat2Wasm
  • Headless
  • WASI
  • CPU Features
    • Bulk Memory?
    • Memory64?
    • Module Linking?
    • Multi Memory?
    • Multi Value?
  • Featues
    • Reference Type
    • SIMD
    • Tail Call
    • Thread
  • Metering?
  • Middleware?

Examples

  • Basics
    • Hello World
    • Instanting a module
    • Handling errors
    • Interacting with memory
  • Exports
    • Exproted global
    • Exproted function
    • Exproted memory
  • Imports
    • Imported global
    • Imported function
  • Externs
    • Table
    • Memory
  • Tunables
    • Limit memory
  • Engines
    • Engine
    • Headless engines
    • Cross-compilation
    • Features
  • Compilers
    • Singlepass compiler
    • Cranelift compiler
    • LLVM compiler
  • Integrations
    • WASI
    • WASI Pipes

Notice

3rd party notices

Lisence

MIT License

About

Provide a C# interface of Wasmer, one of the WebAssembly runtimes, integrating as a native plugin in Unity..

License:MIT License


Languages

Language:C# 100.0%