Skip to content

[dart2wasm] Support non-JS wasm runtimes #53884

Open
@eyebrowsoffire

Description

@eyebrowsoffire

We eventually may want dart2wasm to actually work in non-JavaScript environments (wasmtime, wasmer, etc). @askeksa had mentioned a list of a few things that would definitly need to be addressed in order to remove the dependency on a JS/browser environment:

We are currently dependent on JS for the following components:

  • Event loop
  • Printing
  • OS-level timer features, such as current time
  • Weak maps, weak references, finalizers
  • Stack traces
  • Conversions between double and String
  • Regexps
  • Math functions (sin, pow, exp, etc.)

For each of these, we'll have to either:

  • (1) implement the feature in Dart (or intrinsically in the compiler),
  • (2) link to an implementation compiled to Wasm, or
  • (3) import an external implementation from the host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart2wasmIssues for the dart2wasm compiler.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions