wasm_run 0.0.1+1 copy "wasm_run: ^0.0.1+1" to clipboard
wasm_run: ^0.0.1+1 copied to clipboard

Web Assembly executor. Uses Rust's wasmtime optimizing runtime or wasmi interpreter.

wasm_run #

A Web Assembly executor for the Dart programming language.

Currently it uses the wasmtime 9.0 or wasmi 0.30 Rust crates for parsing and executing WASM modules. Bindings are created using package:flutter_rust_bridge.

For more information on usage and documentation, please visit the main repository: https://github.com/juancastillo0/wasm_run.

Pure Dart (Native) #

For pure Dart application (backend or cli, for example), you may download the compiled dynamic libraries for each platform and specify the ffi.DynamicLibrary in the setDynamicLibrary function or execute the script dart run wasm_run:setup to download the right library for your current platform and configure it so that you don't need to call setDynamicLibrary manually. The compiled libraries can be found in the releases assets of this repository.

Flutter #

When using it in a Flutter project you should use package:wasm_run_flutter instead, since it will provide the right binaries for your platform.

Dart Web (Not Flutter Web) #

We use the wasm-feature-detect JavaScript library for feature detection in the browser. To use this functionality in Dart web applications you will need to add the following script to your html (not necessary for Flutter):

<script src="./packages/wasm_run/assets/wasm-feature-detect.js"></script>
<script type="module" src="./packages/wasm_run/assets/browser_wasi_shim.js"></script>
13
likes
0
pub points
46%
popularity

Publisher

unverified uploader

Web Assembly executor. Uses Rust's wasmtime optimizing runtime or wasmi interpreter.

Repository (GitHub)
View/report issues

Topics

#wasm #interop #runtime #interpreter #ffi

License

unknown (license)

Dependencies

collection, ffi, flutter_rust_bridge, freezed_annotation, http, logging, meta, wasm_interop

More

Packages that depend on wasm_run