Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 7, 2020
1 parent f4d7c7d commit 0e582d2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: V8
Type: Package
Title: Embedded JavaScript and WebAssembly Engine for R
Version: 2.9000
Version: 3.0
Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0002-4035-0289"))
Description: An R interface to V8: Google's open source JavaScript and WebAssembly
Expand All @@ -12,9 +12,11 @@ URL: https://jeroen.cran.dev/V8 (docs)
https://github.com/jeroen/v8 (devel)
https://v8.dev (upstream)
BugReports: https://github.com/jeroen/v8/issues
SystemRequirements: V8 version 6+ recommended, but 3.14 (legacy) is still supported as
well. On Debian / Ubuntu you need either libv8-dev or libnode-dev, on Fedora use
v8-devel.
SystemRequirements: V8 engine version 6+ is needed for modern JS and WASM support. On
Debian / Ubuntu install either libv8-dev or libnode-dev, on Fedora use v8-devel.
The readme has instructions for installing backports on Ubuntu Xenial and Bionic.
It is still possible to build this package against the legacy libv8 version 3.14
branch, but these engines only support traditional (ES5) JavaScript.
NeedsCompilation: yes
VignetteBuilder: knitr
Imports:
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
3.0
- Internal rewrite of object serialization to prepare for wasm
- Automatically convert raw vectors to/from Uint8Array in eval/get/assign
- Experimental wasm interface
- Experimental wasm API + test
- Fix callback API crashes in V8 7.9+ (Jan Marvin, #70, #71, #75)
- Build with -DV8_ENABLE_CHECKS to get better error messages

Expand Down
6 changes: 4 additions & 2 deletions R/wasm.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#' Run WebAssembly
#' Experimental WebAssembly
#'
#' Load a WebAssembly program. Returns a list of exported functions.
#' 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.
#'
#' @export
#' @param data either raw vector or file path with the binary wasm program
Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test_wasm.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
context("WASM")

test_that("Load WASM program", {
skip_if_not(engine_info()$version > 6)
instance <- wasm(system.file('wasm/add.wasm', package = 'V8'))
expect_equal(names(instance$exports), 'add')
expect_equal(instance$exports$add(12, 30), 42)
})

0 comments on commit 0e582d2

Please sign in to comment.