wasm {V8}R Documentation

Run WebAssembly

Description

Load a WebAssembly program. Returns a list of exported functions.

Usage

wasm(data)

Arguments

data

either raw vector or file path with the binary wasm program

Examples

# Load example wasm program
if(engine_info()$version > 6){
instance <- wasm(system.file('wasm/add.wasm', package = 'V8'))
instance$exports$add(12, 30)
}

[Package V8 version 3.0.2 Index]