Skip to content
pubscout

wasm_interop

2.0.1, released 5 years ago by an unverified publisher

Dart wrapper for the WebAssembly JavaScript API.

$ flutter pub add wasm_interop
Source repository

What it does

Provides Dart bindings for the WebAssembly JavaScript API for web environments. It is designed for standalone WebAssembly modules that do not require specialized JavaScript glue code.

AI-written summary of version 2.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Targeting the web platform and interacting with standalone WebAssembly modules.
  • Working with AssemblyScript or Emscripten standalone WebAssembly modules in Dart.

Skip it when

  • Targeting non-JS environments (use the 'wasm' package instead).
  • Using WebAssembly modules that require specialized JavaScript glue code (use 'dart:js' or 'package:js' instead).

Strengths

  • Enables direct interop with the WebAssembly JavaScript API on the web.
  • Supports null-safety and recent WebAssembly IDL features like 64-bit integer Globals and externref types.

Weaknesses

  • Limited to web environments where the WebAssembly JavaScript API is available.
  • Not intended for modules requiring custom JavaScript glue code.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
2

Not documented

not documented

Alternatives

Packages that do the same job and could replace wasm_interop.

  • git

    Git command line wrapper for inspecting and manipulating local Git repositories.

  • zstandard

    Flutter plugin for fast Zstandard compression and decompression across native and WebAssembly.

  • adb

    A Dart wrapper for interacting with the Android Debug Bridge (adb).

  • qs_dart

    A query string encoding and decoding library for Dart ported from JavaScript's qs.

Works with

Packages commonly used together with wasm_interop: ones it builds on, ones built on it, and its own family.