Skip to content

WebAssembly support #4379

@xubaiwang

Description

@xubaiwang

As previously discussed in #4369, I'd like create a WebAssembly binding for boa_runtime. This issue is opened as a feature tracker/checklist.

Runtime choice

At the time of writing, there are basically three WebAssembly runtime in Rust:

  • wasmtime
  • wasmer
  • wasmi

I personally do not want to use wasmer for their notorious trademark misconduct.

So the choice is between wasmtime and wasmi. These two serve for different purposes:

  • wasmtime is JIT based and is suitable for computation intensive works
  • wasmi is interpreter based and have a focus on startup time and resource usage (binary size, memory).

Taking into account different use cases, these two can both be implemented with different feature flag.

I'll first implement the wasmi one, as there is currently some friction between wasmtime and WASM JS API (e.g. missing custom section API, all error message hidden under anyhow, ...).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions