Skip to content

v8: enable inline WASM in serialization API - #25313

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:v8-serdes-inline-wasm
Closed

v8: enable inline WASM in serialization API#25313
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:v8-serdes-inline-wasm

Conversation

@addaleax

Copy link
Copy Markdown
Member

Since the API we expose through the v8 module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jan 2, 2019
@addaleaxaddaleax added v8 engine Issues and PRs related to the V8 dependency. wasm Issues and PRs related to WebAssembly. and removed c++ Issues and PRs that require attention from people who are familiar with C++. labels Jan 2, 2019
@addaleax

Copy link
Copy Markdown
MemberAuthor

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 2, 2019

@bnoordhuisbnoordhuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just curious, are there any conceivable security implications? I can't think of any but I thought I'd ask anyway.

@addaleax

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis I can’t think of any either – this makes it possible to transfer executable code, but IIUC you’d still have to explicitly instantiate the WASM module in order to get callable objects (and even then I wouldn’t see how this could be problematic).

@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in 47a9eea

@addaleaxaddaleax closed this Jan 5, 2019
@addaleax
addaleax deleted the v8-serdes-inline-wasm branch January 5, 2019 23:54
addaleax added a commit that referenced this pull request Jan 5, 2019
Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.
PR-URL: #25313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
addaleax added a commit that referenced this pull request Jan 9, 2019
Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.
PR-URL: #25313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.
PR-URL: nodejs#25313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
@BridgeARBridgeAR mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
Since the API we expose through the `v8` module is Buffer-based,
we cannot transfer WASM modules directly. Instead, we enable
the V8-provided inline WASM (de)serialization for WASM modules.
PR-URL: nodejs#25313
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gus Caplan <me@gus.host>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.v8 engineIssues and PRs related to the V8 dependency.wasmIssues and PRs related to WebAssembly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@addaleax@nodejs-github-bot@bnoordhuis@jasnell@cjihrig@devsnek