Skip to content

lib: add WebAssembly to primordials#36433

Closed
ExE-Boss wants to merge 1 commit into
nodejs:mainfrom
ExE-Boss:lib/primordials/add-wasm
Closed

lib: add WebAssembly to primordials#36433
ExE-Boss wants to merge 1 commit into
nodejs:mainfrom
ExE-Boss:lib/primordials/add-wasm

Conversation

@ExE-Boss

@ExE-Boss ExE-Boss commented Dec 7, 2020

Copy link
Copy Markdown
Contributor

This is used to handle support for WebAssembly modules and static analysis of named exports from CommonJS modules.


Note that adding WebAssembly types to /typings/primordials.d.ts depends on microsoft/TypeScript-DOM-lib-generator#959 in order to avoid adding lib: ["DOM"] to tsconfig.json.

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

@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. tools Issues and PRs related to the tools directory. labels Dec 7, 2020
Comment thread lib/internal/modules/esm/translators.js Outdated
Comment thread lib/internal/per_context/primordials.js Outdated
Comment thread lib/internal/per_context/primordials.js Outdated
@ExE-Boss ExE-Boss force-pushed the lib/primordials/add-wasm branch 2 times, most recently from 623895e to f016a82 Compare December 10, 2020 19:58
@Trott

Trott commented Dec 12, 2020

Copy link
Copy Markdown
Member

Failures in GitHub CI (e.g., test-esm-wasm) seem related?

@ExE-Boss

Copy link
Copy Markdown
Contributor Author

I have no idea why:

const { WebAssemblyCompile } = primordials;
WebAssemblyCompile(...);

doesn’t work, but:

const { WebAssembly } = primordials;
WebAssembly.compile(...);

does.

@aduh95

aduh95 commented Dec 12, 2020

Copy link
Copy Markdown
Contributor

FWIW, it works on my machine™, I do not get the same error as the CI (all the tests pass). I compile with the --node-builtin-modules-path configure flag, that might be related.

@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2020
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 23, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@targos

targos commented Jul 11, 2021

Copy link
Copy Markdown
Member

@ExE-Boss would you like to rebase? Maybe it will work with the current V8 version

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@ExE-Boss ExE-Boss force-pushed the lib/primordials/add-wasm branch from f016a82 to 5788f16 Compare September 27, 2021 20:26
@Mesteery Mesteery added the needs-ci PRs that need a full CI run. label Oct 28, 2021
@aduh95

aduh95 commented May 5, 2024

Copy link
Copy Markdown
Contributor

IIUC this is never going to work because of the --jitless flag:

// --jitless also implies --no-expose-wasm, see InitializeOncePerProcessImpl.

@aduh95 aduh95 closed this May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants