File: wasm.Rd

package info (click to toggle)
r-cran-v8 6.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: javascript: 980; cpp: 424; sh: 23; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 860 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wasm.R
\name{wasm}
\alias{wasm}
\alias{wasm_features}
\title{Experimental WebAssembly}
\usage{
wasm(data)

wasm_features()
}
\arguments{
\item{data}{either raw vector or file path with the binary wasm program}
}
\description{
Experimental wrapper to load a WebAssembly program. Returns a list of
exported functions. This will probably be moved into it's own package
once WebAssembly matures.
}
\details{
The \code{wasm_features()} function uses the \href{https://github.com/GoogleChromeLabs/wasm-feature-detect}{wasm-feature-detect}
JavaScript library to test which WASM capabilities are supported in the
current version of libv8.
}
\examples{
# Load example wasm program
instance <- wasm(system.file('wasm/add.wasm', package = 'V8'))
instance$exports$add(12, 30)
wasm_features()
}